mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-05 23:28:44 +00:00
♻️ fix search params on other tables too
This commit is contained in:
@@ -638,7 +638,7 @@ export default function ClientResourcesTable({
|
||||
rows={internalResources}
|
||||
tableId="internal-resources"
|
||||
searchPlaceholder={t("resourcesSearch")}
|
||||
searchQuery={searchParams.get("query") ?? ""}
|
||||
searchQuery={searchParams.get("query")?.toString()}
|
||||
onAdd={() => setIsCreateDialogOpen(true)}
|
||||
addButtonText={t("resourceAdd")}
|
||||
onSearch={handleSearchChange}
|
||||
|
||||
@@ -109,7 +109,6 @@ export default function HealthChecksTable({
|
||||
const [siteFilterOpen, setSiteFilterOpen] = useState(false);
|
||||
const [resourceFilterOpen, setResourceFilterOpen] = useState(false);
|
||||
|
||||
const pageSize = pagination.pageSize;
|
||||
const query = searchParams.get("query") ?? undefined;
|
||||
|
||||
const siteIdQ = searchParams.get("siteId");
|
||||
@@ -586,7 +585,9 @@ export default function HealthChecksTable({
|
||||
<Switch
|
||||
checked={r.hcEnabled}
|
||||
disabled={
|
||||
!isPaid || togglingId === r.targetHealthCheckId || !!r.resourceId
|
||||
!isPaid ||
|
||||
togglingId === r.targetHealthCheckId ||
|
||||
!!r.resourceId
|
||||
}
|
||||
onCheckedChange={(v) => handleToggleEnabled(r, v)}
|
||||
/>
|
||||
|
||||
@@ -582,6 +582,7 @@ export default function MachineClientsTable({
|
||||
rows={machineClients}
|
||||
tableId="machine-clients"
|
||||
searchPlaceholder={t("machinesSearch")}
|
||||
searchQuery={searchParams.get("query")?.toString()}
|
||||
onAdd={() =>
|
||||
startNavigation(() =>
|
||||
router.push(`/${orgId}/settings/clients/machine/create`)
|
||||
@@ -599,35 +600,6 @@ export default function MachineClientsTable({
|
||||
columnVisibility={defaultMachineColumnVisibility}
|
||||
stickyLeftColumn="name"
|
||||
stickyRightColumn="actions"
|
||||
filters={[
|
||||
{
|
||||
id: "status",
|
||||
label: t("status") || "Status",
|
||||
multiSelect: true,
|
||||
displayMode: "calculated",
|
||||
options: [
|
||||
{
|
||||
id: "active",
|
||||
label: t("active") || "Active",
|
||||
value: "active"
|
||||
},
|
||||
{
|
||||
id: "archived",
|
||||
label: t("archived") || "Archived",
|
||||
value: "archived"
|
||||
},
|
||||
{
|
||||
id: "blocked",
|
||||
label: t("blocked") || "Blocked",
|
||||
value: "blocked"
|
||||
}
|
||||
],
|
||||
onValueChange(selectedValues: string[]) {
|
||||
handleFilterChange("status", selectedValues);
|
||||
},
|
||||
values: searchParams.getAll("status")
|
||||
}
|
||||
]}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -730,6 +730,7 @@ export default function ProxyResourcesTable({
|
||||
searchPlaceholder={t("resourcesSearch")}
|
||||
pagination={pagination}
|
||||
rowCount={rowCount}
|
||||
searchQuery={searchParams.get("query")?.toString()}
|
||||
onSearch={handleSearchChange}
|
||||
onPaginationChange={handlePaginationChange}
|
||||
onAdd={() =>
|
||||
|
||||
Reference in New Issue
Block a user