mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-29 08:06:46 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user