ui/client/features/list-browser/hooks/useUrlSelection
Cockpit client (features), v0.9. Source: ui/client/features/list-browser/hooks/useUrlSelection.tsx.
Functions#
useUrlSelection()#
useUrlSelection(
param):object
Defined in: ui/client/features/list-browser/hooks/useUrlSelection.tsx:9
A selection that lives in the URL query (?feature=billing): read once after mount (so server and first client
paint agree), written with history.replaceState (no new history entry, no navigation, no re-render of the route).
ready is false until the URL has been read, so a screen does not flash "nothing selected" before restoring it.
Parameters#
param
string
Returns#
object
ready
ready:
boolean
select
select: (
next) =>void
Parameters
next
string | null
Returns
void
value
value:
string|null