swarm-ui: bounded-domain table filters become dropdowns
Table columns whose value only ever comes from a small closed set (freshness, wanted, hive) get a <select> in their filter-row cell instead of a free-text input, populated from the distinct values present in the currently-loaded rows plus an "any" option, matched by exact equality instead of substring. Free-text columns (name, the agent's own status message, config PR, hive domain) are unchanged.
This commit is contained in:
parent
a204b5f457
commit
4544c458eb
4 changed files with 63 additions and 8 deletions
|
|
@ -92,6 +92,7 @@ const COLUMNS: TableColumn<HiveStatus>[] = [
|
|||
},
|
||||
sortBy: (h) => FRESHNESS[h.freshness].label,
|
||||
filterValue: (h) => FRESHNESS[h.freshness].label,
|
||||
filterMode: "select",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue