gabotorresruiz commented on code in PR #43460:
URL: https://github.com/apache/superset/pull/43460#discussion_r3865746913
##########
superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx:
##########
@@ -308,49 +328,60 @@ const Select = forwardRef(
!isSingleMode &&
allowSelectAll &&
selectOptions.length > 0 &&
- enabledOptions.length > 1,
+ // When stableSelectAll is on, gate visibility on the full eligible set
+ // so the bulk control does not hide/flicker while a search narrows
+ // visibleOptions.
+ (stableSelectAll
+ ? fullSelectAllOptions.length
+ : enabledOptions.length) > 1,
Review Comment:
Not a blocker, just an observation I verified on this branch: with
`stableSelectAll` on, this gate hides the bulk controls entirely for columns
whose values are mostly falsy. A boolean column (values `true`/`false`) renders
no "Select all"/"Clear" buttons at all, while the non-stable gate on master
shows `Select all (1)` for the same options. I think hiding it is actually more
honest than advertising `Select all (1)` on a two-value column, so I'm fine
with it, but flagging that boolean Value filters also lose the "Clear" button
with this change.
##########
superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx:
##########
@@ -882,6 +882,107 @@ describe('SelectFilterPlugin', () => {
userEvent.type(screen.getByRole('combobox'), 'brand-new');
expect(screen.queryByTitle('brand-new')).not.toBeInTheDocument();
});
+
+ // The native Value filter's "Select all" targets the whole column, so its
+ // count must stay pinned to the full option set while the user searches — no
+ // transient scoped value (regression for Shortcut 115492). This integration
Review Comment:
Just a small NIT: this comment references Shortcut 115492, an internal
tracker id that OSS readers can't resolve. I'd drop the reference (or point to
a GitHub issue if one exists).
--
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]