mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-06 20:51:36 +02:00
♻️ fix search params on other tables too
This commit is contained in:
@@ -638,7 +638,7 @@ export default function ClientResourcesTable({
|
|||||||
rows={internalResources}
|
rows={internalResources}
|
||||||
tableId="internal-resources"
|
tableId="internal-resources"
|
||||||
searchPlaceholder={t("resourcesSearch")}
|
searchPlaceholder={t("resourcesSearch")}
|
||||||
searchQuery={searchParams.get("query") ?? ""}
|
searchQuery={searchParams.get("query")?.toString()}
|
||||||
onAdd={() => setIsCreateDialogOpen(true)}
|
onAdd={() => setIsCreateDialogOpen(true)}
|
||||||
addButtonText={t("resourceAdd")}
|
addButtonText={t("resourceAdd")}
|
||||||
onSearch={handleSearchChange}
|
onSearch={handleSearchChange}
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ export default function HealthChecksTable({
|
|||||||
const [siteFilterOpen, setSiteFilterOpen] = useState(false);
|
const [siteFilterOpen, setSiteFilterOpen] = useState(false);
|
||||||
const [resourceFilterOpen, setResourceFilterOpen] = useState(false);
|
const [resourceFilterOpen, setResourceFilterOpen] = useState(false);
|
||||||
|
|
||||||
const pageSize = pagination.pageSize;
|
|
||||||
const query = searchParams.get("query") ?? undefined;
|
const query = searchParams.get("query") ?? undefined;
|
||||||
|
|
||||||
const siteIdQ = searchParams.get("siteId");
|
const siteIdQ = searchParams.get("siteId");
|
||||||
@@ -586,7 +585,9 @@ export default function HealthChecksTable({
|
|||||||
<Switch
|
<Switch
|
||||||
checked={r.hcEnabled}
|
checked={r.hcEnabled}
|
||||||
disabled={
|
disabled={
|
||||||
!isPaid || togglingId === r.targetHealthCheckId || !!r.resourceId
|
!isPaid ||
|
||||||
|
togglingId === r.targetHealthCheckId ||
|
||||||
|
!!r.resourceId
|
||||||
}
|
}
|
||||||
onCheckedChange={(v) => handleToggleEnabled(r, v)}
|
onCheckedChange={(v) => handleToggleEnabled(r, v)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -582,6 +582,7 @@ export default function MachineClientsTable({
|
|||||||
rows={machineClients}
|
rows={machineClients}
|
||||||
tableId="machine-clients"
|
tableId="machine-clients"
|
||||||
searchPlaceholder={t("machinesSearch")}
|
searchPlaceholder={t("machinesSearch")}
|
||||||
|
searchQuery={searchParams.get("query")?.toString()}
|
||||||
onAdd={() =>
|
onAdd={() =>
|
||||||
startNavigation(() =>
|
startNavigation(() =>
|
||||||
router.push(`/${orgId}/settings/clients/machine/create`)
|
router.push(`/${orgId}/settings/clients/machine/create`)
|
||||||
@@ -599,35 +600,6 @@ export default function MachineClientsTable({
|
|||||||
columnVisibility={defaultMachineColumnVisibility}
|
columnVisibility={defaultMachineColumnVisibility}
|
||||||
stickyLeftColumn="name"
|
stickyLeftColumn="name"
|
||||||
stickyRightColumn="actions"
|
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")}
|
searchPlaceholder={t("resourcesSearch")}
|
||||||
pagination={pagination}
|
pagination={pagination}
|
||||||
rowCount={rowCount}
|
rowCount={rowCount}
|
||||||
|
searchQuery={searchParams.get("query")?.toString()}
|
||||||
onSearch={handleSearchChange}
|
onSearch={handleSearchChange}
|
||||||
onPaginationChange={handlePaginationChange}
|
onPaginationChange={handlePaginationChange}
|
||||||
onAdd={() =>
|
onAdd={() =>
|
||||||
|
|||||||
Reference in New Issue
Block a user