endimonan opened a new pull request, #38470: URL: https://github.com/apache/superset/pull/38470
### SUMMARY Adds a configurable "Match type" option to the native Select (Value) dashboard filter, enabling partial text matching via ILIKE operators in addition to the default exact match (IN). This addresses a long-standing community request ([Discussion #25358](https://github.com/apache/superset/discussions/25358)) where users need to filter by partial text (e.g., typing "Jen" to find "Jennifer", "Jenna", "Jenny") but are limited to selecting exact values from a dropdown. **New "Match type" options in filter configuration:** - **Exact match (IN)** — default, preserves existing behavior - **Contains text (ILIKE %x%)** — matches anywhere in the string - **Starts with (ILIKE x%)** — matches from the beginning - **Ends with (ILIKE %x)** — matches at the end When an ILIKE operator is selected, the filter renders a free-text Input field (with debounce) instead of the dropdown Select. Inverse selection uses NOT ILIKE accordingly. Includes a performance warning tooltip since ILIKE queries may not leverage indexes on large datasets. **Files changed (9):** - `types.ts` — new `SelectFilterOperatorType` enum + `operatorType` in form data - `controlPanel.ts` — new "Match type" SelectControl with 4 options - `utils.ts` — `getSelectExtraFormData()` now supports ILIKE/NOT ILIKE with wildcards - `SelectFilterPlugin.tsx` — conditional Input vs Select rendering based on operator - `Operator.ts` — added `NOT ILIKE` to `BINARY_OPERATORS` - `FiltersConfigForm.tsx` — custom rendering of Match type dropdown in config modal - `getControlItemsMap.tsx` — excludes `operatorType` from generic checkbox loop ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!-- Will add video/screenshots showing the before/after behavior --> ### TESTING INSTRUCTIONS 1. Open any dashboard with a native Select filter on a text column (e.g., `name` on `birth_names`) 2. Enter edit mode → click the filter pencil icon to configure 3. In the configuration modal, find the new **"Match type"** dropdown under "UI Configuration" 4. Change from "Exact match (IN)" to "Contains text (ILIKE %x%)" 5. Save the filter configuration 6. The filter should now show a **text input** instead of a dropdown 7. Type a partial value (e.g., "Jen") — the dashboard charts should update showing all matching records (Jennifer, Jenna, etc.) 8. Verify "Starts with" and "Ends with" modes work similarly 9. Verify "Exact match" still renders the original Select dropdown 10. Verify inverse selection (is/is not) works correctly with ILIKE operators ### ADDITIONAL INFORMATION - [x] Has associated issue: [Discussion #25358](https://github.com/apache/superset/discussions/25358) - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration - [x] Introduces new feature or API - [ ] Removes existing feature or API Made with [Cursor](https://cursor.com) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
