diff --git a/src/components/pages/expense/form/ExpenseRequestForm.tsx b/src/components/pages/expense/form/ExpenseRequestForm.tsx index adc825c2..b50798c2 100644 --- a/src/components/pages/expense/form/ExpenseRequestForm.tsx +++ b/src/components/pages/expense/form/ExpenseRequestForm.tsx @@ -178,12 +178,14 @@ const ExpenseRequestForm = ({ setInputValue: setLocationInputValue, options: locationOptions, isLoadingOptions: isLoadingLocationOptions, + loadMore: loadMoreLocations, } = useSelect(LocationApi.basePath, 'id', 'name'); const { setInputValue: setVendorInputValue, options: supplierOptions, isLoadingOptions: isLoadingVendorOptions, + loadMore: loadMoreSuppliers, } = useSelect(SupplierApi.basePath, 'id', 'name'); const categoryChangeHandler = (val: OptionType | OptionType[] | null) => { @@ -408,6 +410,7 @@ const ExpenseRequestForm = ({ options={locationOptions} onInputChange={setLocationInputValue} isLoading={isLoadingLocationOptions} + onMenuScrollToBottom={loadMoreLocations} isError={ formik.touched.location_id && Boolean(formik.errors.location_id) } @@ -452,6 +455,7 @@ const ExpenseRequestForm = ({ options={supplierOptions} onInputChange={setVendorInputValue} isLoading={isLoadingVendorOptions} + onMenuScrollToBottom={loadMoreSuppliers} isError={ formik.touched.supplier_id && Boolean(formik.errors.supplier_id) }