fix(FE): implement lazy loading select button on marketing index

This commit is contained in:
randy-ar
2026-01-15 17:03:25 +07:00
parent 73100aa1ce
commit a1bbe4e2d7
@@ -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}
/>
</TableRowSizeSelector>
</div>