rusackas opened a new pull request, #41136:
URL: https://github.com/apache/superset/pull/41136
### SUMMARY
Fixes #32645.
Dashboard filters configured with **Can select multiple values** +
**Dynamically search all filter values** only load a single page of options on
the client (the first ~1000 rows). When you paste a comma-separated list into
such a filter, the synchronous `Select`'s paste handler only checked the
currently-loaded options. Because `searchAllOptions` sets
`allowNewOptions={false}`, any pasted value outside the loaded page was
silently dropped, which made the entire paste look like it failed.
This adds an opt-in `allowNewOptionsOnPaste` prop to `Select`. When set,
pasted values that aren't in the loaded options are kept (instead of dropped)
so they can still be applied to the filter query - which is correct here, since
for `searchAllOptions` the full value space lives server-side and a pasted
value can legitimately exist beyond the loaded page. The filter plugin enables
it for multi-select `searchAllOptions` filters.
The prop defaults to `false`, so paste behavior for every other `Select`
(including the existing "don't create unknown options when `allowNewOptions` is
false" contract) is unchanged.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
_N/A - behavioral fix. See the repro steps in #32645._
Before: pasting `valueWithinFirst1000,valueBeyondFirst1000` selected nothing.
After: both values are selected and applied to the filter.
### TESTING INSTRUCTIONS
1. Create a native Select filter on a column with > 1000 distinct values.
2. Enable **Can select multiple values** and **Dynamically search all filter
values**.
3. Copy a comma-separated list containing at least one value that sorts
beyond the first 1000 loaded options.
4. Paste it into the filter - all values are now selected and the dashboard
filters accordingly.
Unit tests added in `Select.test.tsx` cover both the new behavior (values
kept when `allowNewOptionsOnPaste` is on) and the guard (values still dropped
when it's off).
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #32645
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]