formatting

This commit is contained in:
Amirhossein Mahmoodi
2024-08-18 11:11:58 +03:30
parent f7c93d0404
commit f2e199ee8a
40 changed files with 733 additions and 450 deletions

View File

@@ -32,13 +32,11 @@ const DataTable_Main = (props) => {
const fetchUrl = useMemo(() => {
const isValueEmpty = (value) => {
if (Array.isArray(value)) {
return value.length === 0 || value.every(v => v === "");
return value.length === 0 || value.every((v) => v === "");
}
return value === "" || value === null || value === undefined;
};
const filteredFilterData = Object.values(filterData).filter(
(filter) => !isValueEmpty(filter.value),
);
const filteredFilterData = Object.values(filterData).filter((filter) => !isValueEmpty(filter.value));
const params = new URLSearchParams();
params.set("start", `${pagination.pageIndex * pagination.pageSize}`);