feat: search input

This commit is contained in:
2024-08-24 05:19:16 +03:00
parent 40769d3664
commit 76d37d54d9

View File

@@ -11,7 +11,10 @@ type RestProps = {
}
type Props = Omit<ObjectSelectProps<ProductSchema>, 'data'> & RestProps;
const ProductSelect: FC<Props> = (props: Props) => {
const {products} = useProductsList({clientId: props.clientId});
const {products} = useProductsList({
clientId: props.clientId,
searchInput: ""
});
const restProps = omit(props, ['clientId']);
const renderOption: SelectProps['renderOption'] = (item) => {
const product = products.find(product => product.id == parseInt(item.option.value));