From a1bbe4e2d70485ecf100a7b3d7967e748a01f74e Mon Sep 17 00:00:00 2001 From: randy-ar Date: Thu, 15 Jan 2026 17:03:25 +0700 Subject: [PATCH] fix(FE): implement lazy loading select button on marketing index --- src/components/pages/marketing/MarketingTable.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/pages/marketing/MarketingTable.tsx b/src/components/pages/marketing/MarketingTable.tsx index 1c37dbbb..467c2e00 100644 --- a/src/components/pages/marketing/MarketingTable.tsx +++ b/src/components/pages/marketing/MarketingTable.tsx @@ -184,12 +184,16 @@ const MarketingTable = () => { const { options: productsOptions, isLoadingOptions: isLoadingProductsOptions, + setInputValue: setProductsInputValue, + loadMore: loadMoreProducts, } = useSelect(ProductApi.basePath, 'id', 'name', '', { limit: 'limit', }); const { options: customersOptions, isLoadingOptions: isLoadingCustomersOptions, + setInputValue: setCustomersInputValue, + loadMore: loadMoreCustomers, } = useSelect(CustomerApi.basePath, 'id', 'name', '', { limit: 'limit', }); @@ -400,6 +404,8 @@ const MarketingTable = () => { .join(',') || '' ) } + onInputChange={setProductsInputValue} + onMenuScrollToBottom={loadMoreProducts} isMulti /> {/* select status */} @@ -444,6 +450,8 @@ const MarketingTable = () => { (value as OptionType)?.value.toString() || '' ) } + onInputChange={setCustomersInputValue} + onMenuScrollToBottom={loadMoreCustomers} />