You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "madhushreeag (via GitHub)" <gi...@apache.org> on 2026/06/15 20:53:38 UTC
[PR] fix(dropdown):clear search input after selection in all multi-select fields [superset]
madhushreeag opened a new pull request, #41074:
URL: https://github.com/apache/superset/pull/41074
### SUMMARY
The custom Select/AsyncSelect component from @superset-ui/core defaults autoClearSearchValue to false, unlike antd's default value true. This causes typed search text to remain visible in the input after selecting an option in any multi-select field, forcing users to manually delete the text before searching for the next value.
Fixed this behavior by adding autoClearSearchValue to every affected multi-select across the app.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<img width="342" height="307" alt="image" src="https://github.com/user-attachments/assets/30a89339-eb58-41be-914d-69f2ac4c25d1" />
### TESTING INSTRUCTIONS
<img width="343" height="303" alt="image" src="https://github.com/user-attachments/assets/d06e0f51-952a-4074-819d-c0fef22e7b24" />
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] 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
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dropdown): clear search input after selection in all multi-select fields [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41074:
URL: https://github.com/apache/superset/pull/41074#issuecomment-4805507056
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dropdown): clear search input after selection in all multi-select fields [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #41074:
URL: https://github.com/apache/superset/pull/41074#discussion_r3482921432
##########
superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx:
##########
@@ -267,6 +267,9 @@ const AsyncSelect = forwardRef(
});
fireOnChange();
}
+ if (autoClearSearchValue) {
+ setInputValue('');
+ }
Review Comment:
**Suggestion:** Clearing `inputValue` on select without handling `fetchOnlyOnSearch` creates inconsistent async behavior: when `fetchOnlyOnSearch` is true, `allowFetch` becomes false after this clear, so the reset/fetch effect is skipped and the dropdown keeps showing stale search results while the visible query is empty. This makes the UI state inconsistent and can surface outdated options after selection. Only clear in this path if you also explicitly reset options/state for `fetchOnlyOnSearch` mode. [incorrect condition logic]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ AsynchronousSelect story shows stale results after clearing search.
- ⚠️ Future fetchOnlyOnSearch AsyncSelect users see inconsistent dropdown state.
- ⚠️ Remote multi-select UX degrades for large async option sets.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Open the Storybook story `AsynchronousSelect` defined in
`superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.stories.tsx:11-21`,
configure its controls so that `fetchOnlyOnSearch` is `true` (passed through to
`<AsyncSelect>` at line 101) and `mode="multiple"` (so the multiple-selection path in
`handleOnSelect` is used).
2. With the story rendered, open the dropdown; in `AsyncSelect`
(`superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx`),
`allowFetch` is computed at line 171 as `!fetchOnlyOnSearch || inputValue`, which is
`false` because `fetchOnlyOnSearch` is true and `inputValue` is initially empty, so the
fetch/reset effect at lines 90-110 (which restores base options or refetches on empty
input) is gated off until a non-empty search term is entered.
3. Type a search term such as `"geo"` into the combobox; `handleOnSearch` at lines 440-468
sets `inputValue` to the typed string and, with `allowFetch` now true, triggers
`debouncedFetchPage`, which calls `fetchPage` at lines 333-423 to populate `selectOptions`
with remote results (e.g. the user `"George"`), which are rendered by `<StyledSelect>` via
its `options={fullSelectOptions}` prop at lines 225-226.
4. Click one of the search results to select it; `handleOnSelect` at lines 243-274 runs,
and in multiple mode it appends the selected item to `selectValue` (lines 255-268), then
executes the new block `if (autoClearSearchValue) { setInputValue(''); }` at lines
270-272, which clears `inputValue` while leaving `selectOptions` unchanged; because
`fetchOnlyOnSearch` is true, `allowFetch` recomputes to `false` (line 171), so on the
subsequent effect run the guarded block at lines 90-110 is skipped and no reset or refetch
occurs, resulting in the dropdown still showing the stale filtered search results even
though the visible search input (controlled by `autoClearSearchValue` on `<StyledSelect>`
at line 204) is now empty.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=73997958fe44420c8f0685c068dd76c7&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=73997958fe44420c8f0685c068dd76c7&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx
**Line:** 270:272
**Comment:**
*Incorrect Condition Logic: Clearing `inputValue` on select without handling `fetchOnlyOnSearch` creates inconsistent async behavior: when `fetchOnlyOnSearch` is true, `allowFetch` becomes false after this clear, so the reset/fetch effect is skipped and the dropdown keeps showing stale search results while the visible query is empty. This makes the UI state inconsistent and can surface outdated options after selection. Only clear in this path if you also explicitly reset options/state for `fetchOnlyOnSearch` mode.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41074&comment_hash=44fffee9321c496a0bc1000f6530389ccb30a51d61734676eb3b8a957a68dc40&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41074&comment_hash=44fffee9321c496a0bc1000f6530389ccb30a51d61734676eb3b8a957a68dc40&reaction=dislike'>👎</a>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dropdown): clear search input after selection in all multi-select fields [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41074:
URL: https://github.com/apache/superset/pull/41074#issuecomment-4813017463
**Bito Automatic Review Skipped – PR Already Merged**<br/><br/>Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.<br/>No action is needed if you didn't intend to review it. To get a review, you can type `/review` in a comment and save it
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dropdown):clear search input after selection in all multi-select fields [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41074:
URL: https://github.com/apache/superset/pull/41074#issuecomment-4712343263
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dropdown): clear search input after selection in all multi-select fields [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41074:
URL: https://github.com/apache/superset/pull/41074#issuecomment-4712503782
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41074?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 64.26%. Comparing base ([`379435b`](https://app.codecov.io/gh/apache/superset/commit/379435b7eb5b76f393836f1e7f195da5a959d1c8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`f30948c`](https://app.codecov.io/gh/apache/superset/commit/f30948c46a20c1fe9a34587fdd574f64929c3865?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #41074 +/- ##
=======================================
Coverage 64.26% 64.26%
=======================================
Files 2660 2660
Lines 144771 144771
Branches 33379 33379
=======================================
Hits 93044 93044
Misses 50078 50078
Partials 1649 1649
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/41074/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/41074/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.32% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41074?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dropdown): clear search input after selection in all multi-select fields [superset]
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro merged PR #41074:
URL: https://github.com/apache/superset/pull/41074
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dropdown): clear search input after selection in all multi-select fields [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41074:
URL: https://github.com/apache/superset/pull/41074#issuecomment-4811685479
<!-- Bito Reply -->
The flagged issue is correct. When `fetchOnlyOnSearch` is enabled, clearing `inputValue` without resetting the options or state causes the component to stop fetching (because `allowFetch` becomes false), leaving the dropdown populated with stale search results. To resolve this, you should ensure that when `autoClearSearchValue` triggers a reset of `inputValue`, it also resets the internal options state to match the empty-input behavior expected by `fetchOnlyOnSearch`.
Here is a concise fix for `superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx`:
```tsx
if (autoClearSearchValue) {
setInputValue('');
if (fetchOnlyOnSearch) {
setSelectOptions([]);
}
}
```
There are no other comments on this PR to address. Would you like me to perform any other checks?
**superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx**
```
if (autoClearSearchValue) {
setInputValue('');
if (fetchOnlyOnSearch) {
setSelectOptions([]);
}
}
```
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dropdown): clear search input after selection in all multi-select fields [superset]
Posted by "madhushreeag (via GitHub)" <gi...@apache.org>.
madhushreeag commented on PR #41074:
URL: https://github.com/apache/superset/pull/41074#issuecomment-4811579311
> ### Code Review Agent Run #3c400a
> Actionable Suggestions - 0
> Additional Suggestions - 1
> Review Details
> Bito Usage Guide
> AI Code Review powered by [<img alt="Bito Logo" width="50" height="20" src="https://camo.githubusercontent.com/810f9c950a15f18a9a21d4e214820ef360ea3b08a4b5dea95d24529fffd09ed6/68747470733a2f2f6269746f2e61692f77702d636f6e74656e742f75706c6f6164732f323032332f31302f4c6f676f2d4269746f2d426c61636b2d63726f707065642e737667">](https://bito.ai/)
This is intentional and the correct behavior — the whole point of this PR is that false was the wrong default. Ant Design's default is true.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dropdown): clear search input after selection in all multi-select fields [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41074:
URL: https://github.com/apache/superset/pull/41074#issuecomment-4713556443
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dropdown): clear search input after selection in all multi-select fields [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #41074:
URL: https://github.com/apache/superset/pull/41074#issuecomment-4798805396
Thanks for the ping, @villebro. We originally kept this behavior for multi-selects so users wouldn’t have to re-type text when selecting multiple options—for instance, when several choices share a common prefix like “Marketing:”.
However, since we’ve been aligning more closely with Ant Design patterns, I’m open to changing it. Users who still need the prefix can copy and paste it in the scenario I mentioned above.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org