Modifying Dashboard search clear button to clear all search params.

This commit is contained in:
Roland 2024-05-25 10:48:08 -06:00
parent bd8411bcd7
commit dd13534a39
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
7 changed files with 43 additions and 11 deletions

View file

@ -987,7 +987,10 @@ export const useSearchDate = () => {
updateQuery({fromDate: newFromDate, toDate: newToDate, month: newMonths, 'o': 0});
}
return {dateRange: [fromDate, toDate], setDates, months, clearDate}
const anySearch = (months && months.length > 0) || (fromDate !== null || toDate !== null);
const isEmpty = !anySearch;
return {dateRange: [fromDate, toDate], setDates, months, clearDate, isEmpty}
}
export const useUploadFile = () => {