From 93d4ff93391e03434cad38e9de8308fe03e32bec Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 18 Mar 2026 00:13:18 +0700 Subject: [PATCH] fix: search stock product issue correctly --- .../pages/production/recording/form/RecordingForm.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/pages/production/recording/form/RecordingForm.tsx b/src/components/pages/production/recording/form/RecordingForm.tsx index c9236d19..0d62fd0b 100644 --- a/src/components/pages/production/recording/form/RecordingForm.tsx +++ b/src/components/pages/production/recording/form/RecordingForm.tsx @@ -603,10 +603,11 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { const { options: stockProductOptions, + setInputValue: setStockProductInputValue, rawData: stockProducts, isLoadingOptions: isLoadingStockProducts, loadMore: loadMoreStockProducts, - } = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', '', { + } = useSelect(ProductWarehouseApi.basePath, 'id', 'product.name', 'search', { flags: 'PAKAN,OVK', location_id: stockProductsLocationId, kandang_id: stockProductsKandangId, @@ -2665,6 +2666,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { product.value === stock.product_warehouse_id ) || null } + onInputChange={setStockProductInputValue} onChange={(selectedOption) => { const option = selectedOption as OptionType | null;