fix: suggest filter values by their label and in any case (#12582)

A filter's value suggestions matched the typed text against the option's value only, case-sensitively. On the Runs page "timeframe:within" listed nothing, since every timeframe starts with "Within", and "job_trigger_kind:pub" did not find GCP Pub/Sub, whose value is "gcp". Suggestions now match the label too, ignoring case.
This commit is contained in:
Raunak Burrows
2026-11-24 13:19:37 +01:00
committed by GitHub
parent 10a9d3bf89
commit cf8a1c3850
@@ -498,7 +498,8 @@
.filter((o) => {
if (selectedValues.includes(o.value)) return false
if (!searchSuffix) return true
return o.value.includes(searchSuffix)
const q = searchSuffix.toLowerCase()
return [o.value, o.label].some((t) => t?.toLowerCase().includes(q))
})
.map((option) => ({
type: 'option' as const,