swarm-ui: use multiselect for every enum-shaped table filter
This commit is contained in:
parent
516716fa93
commit
74cb0c2793
3 changed files with 29 additions and 24 deletions
|
|
@ -312,14 +312,12 @@ export function IssueReportPage() {
|
|||
),
|
||||
ariaSort: ariaSortFor("assignees"),
|
||||
render: (r) => (r.assignees.length ? r.assignees.join(", ") : "—"),
|
||||
// Text, not `"select"` — a row can carry more than one assignee,
|
||||
// and `Table`'s select mode matches one whole string per row
|
||||
// exactly, so a real per-assignee dropdown would need `Table`
|
||||
// itself to grow multi-value filtering. Substring search over
|
||||
// the joined string still finds "iris" inside "damocles, iris"
|
||||
// correctly, which covers the actual gap (no way to filter by
|
||||
// assignee at all today).
|
||||
filterValue: (r) => r.assignees.join(", "),
|
||||
// Multiselect, same machinery the "labels" column above already
|
||||
// uses — `r.assignees` is already the per-row array this mode
|
||||
// wants, so there's no reason to fall back to a joined-string
|
||||
// substring search here.
|
||||
filterValues: (r) => r.assignees,
|
||||
filterMode: "multiselect",
|
||||
},
|
||||
{
|
||||
key: "blocked",
|
||||
|
|
@ -337,11 +335,11 @@ export function IssueReportPage() {
|
|||
r.blocked ? <Badge tone="warning" value="blocked" /> : "—",
|
||||
// A distinct gap from the existing "hide blocked" toggle above:
|
||||
// that one only *hides* blocked issues, there was no way to see
|
||||
// *only* the blocked ones. Synthesized two-value string (not the
|
||||
// raw boolean) — `Table`'s select mode needs a string to match,
|
||||
// same as `AgentsPage`'s `wanted ?? "no declaration"` pattern.
|
||||
filterValue: (r) => (r.blocked ? "blocked" : "not blocked"),
|
||||
filterMode: "select",
|
||||
// *only* the blocked ones. Synthesized two-value set (not the raw
|
||||
// boolean) — multiselect, same as every other enum-shaped column,
|
||||
// rather than the single-value `"select"` mode.
|
||||
filterValues: (r) => [r.blocked ? "blocked" : "not blocked"],
|
||||
filterMode: "multiselect",
|
||||
},
|
||||
{
|
||||
key: "depended_on_by_count",
|
||||
|
|
|
|||
Loading…
Reference in a new issue