refactor(FE): Add load-on-scroll for expedition vendor select

This commit is contained in:
rstubryan
2026-01-15 10:00:56 +07:00
parent 427c8aec34
commit cf332b5346
@@ -156,6 +156,8 @@ const PurchaseOrderAcceptApprovalForm = ({
setInputValue: setExpeditionsSelectInputValue, setInputValue: setExpeditionsSelectInputValue,
options: expeditionVendors, options: expeditionVendors,
isLoadingOptions: isLoadingExpeditions, isLoadingOptions: isLoadingExpeditions,
loadMore: loadMoreExpeditions,
hasMore: hasMoreExpeditions,
} = useSelect<Supplier>(SupplierApi.basePath, 'id', 'name', 'search', { } = useSelect<Supplier>(SupplierApi.basePath, 'id', 'name', 'search', {
category: 'BOP', category: 'BOP',
}); });
@@ -570,6 +572,8 @@ const PurchaseOrderAcceptApprovalForm = ({
expeditionVendorChangeHandler(idx, val) expeditionVendorChangeHandler(idx, val)
} }
options={getExpeditionVendorOptions()} options={getExpeditionVendorOptions()}
isLoading={isLoadingExpeditions}
onMenuScrollToBottom={loadMoreExpeditions}
isError={ isError={
isRepeaterInputError(idx, 'expedition_vendor_id') isRepeaterInputError(idx, 'expedition_vendor_id')
.isError .isError