mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-24 22:06:38 +00:00
♻️do not set default values
This commit is contained in:
@@ -699,18 +699,6 @@ export default function UserDevicesTable({
|
|||||||
return allOptions;
|
return allOptions;
|
||||||
}, [t]);
|
}, [t]);
|
||||||
|
|
||||||
const statusFilterValues = useMemo(() => {
|
|
||||||
const status = searchParams.getAll("status");
|
|
||||||
if (status.length > 0) {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (build === "oss") {
|
|
||||||
return ["active"];
|
|
||||||
}
|
|
||||||
return ["active", "pending"];
|
|
||||||
}, [searchParams]);
|
|
||||||
|
|
||||||
function handleFilterChange(
|
function handleFilterChange(
|
||||||
column: string,
|
column: string,
|
||||||
value: string | null | undefined | string[]
|
value: string | null | undefined | string[]
|
||||||
@@ -803,7 +791,7 @@ export default function UserDevicesTable({
|
|||||||
onValueChange: (selectedValues: string[]) => {
|
onValueChange: (selectedValues: string[]) => {
|
||||||
handleFilterChange("status", selectedValues);
|
handleFilterChange("status", selectedValues);
|
||||||
},
|
},
|
||||||
values: statusFilterValues
|
values: searchParams.getAll("status")
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user