diff --git a/src/components/pages/dashboard/DashboardProduction.tsx b/src/components/pages/dashboard/DashboardProduction.tsx index a0f7e471..dea66582 100644 --- a/src/components/pages/dashboard/DashboardProduction.tsx +++ b/src/components/pages/dashboard/DashboardProduction.tsx @@ -117,20 +117,21 @@ const DashboardProduction = () => { } = useSelect(ProjectFlockApi.basePath, 'id', 'flock_name', '', { location_id: selectedLocationIds ? selectedLocationIds.toString() : '', }); + const { setInputValue: setInputValueLocation, options: locationOptions, isLoadingOptions: isLoadingLocationOptions, loadMore: loadMoreLocation, } = useSelect(LocationApi.basePath, 'id', 'name'); + const { setInputValue: setInputValueKandang, options: kandangOptions, isLoadingOptions: isLoadingKandangOptions, loadMore: loadMoreKandang, - } = useSelect(KandangApi.basePath, 'id', 'name', '', { - location_id: selectedLocationIds ? selectedLocationIds.toString() : '', - }); + } = useSelect(KandangApi.basePath, 'id', 'name', ''); + const comparisonTypeOptions = [ { value: 'FARM', label: 'Farm' }, { value: 'FLOCK', label: 'Flock' }, @@ -505,6 +506,7 @@ const DashboardProduction = () => { className={{ select: 'rounded-lg text-sm border-base-content/10', }} + isClearable={true} /> )} @@ -541,6 +543,7 @@ const DashboardProduction = () => { className={{ select: 'rounded-lg text-sm border-base-content/10', }} + isClearable={true} /> ) : ( { className={{ select: 'rounded-lg text-sm border-base-content/10', }} + isClearable={true} /> )} @@ -611,6 +615,7 @@ const DashboardProduction = () => { className={{ select: 'rounded-lg text-sm border-base-content/10', }} + isClearable={true} /> ) : ( { className={{ select: 'rounded-lg text-sm border-base-content/10', }} + isClearable={true} /> )} @@ -675,6 +681,7 @@ const DashboardProduction = () => { className={{ select: 'rounded-lg text-sm border-base-content/10', }} + isClearable={true} /> ) : ( { className={{ select: 'rounded-lg text-sm border-base-content/10', }} + isClearable={true} /> )}