rebenitez1802 commented on code in PR #43460:
URL: https://github.com/apache/superset/pull/43460#discussion_r3862589877


##########
superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx:
##########
@@ -594,9 +618,15 @@ const Select = forwardRef(
     const handleSelectAll = useCallback(() => {
       if (isSingleMode) return;
 
-      const optionsToSelect = isSearching
+      const searchScopedOptions = isSearching
         ? visibleOptions.filter(option => !option.isNewOption)
         : enabledOptions;
+      // When stableSelectAll is on, always select the full eligible set
+      // regardless of any active search, so "Select all" targets the whole
+      // column rather than the search-filtered subset.
+      const optionsToSelect = stableSelectAll

Review Comment:
   Good catch — you're right that `selectAllMode` can go spuriously true here. 
The empty-filter path itself turns out to be unreachable today (antd's 
`onChange` isn't wired, so the remap's two guards are mutually exclusive), so 
the live symptom is just an off-by-one in the collapsed-tag count. Rather than 
retarget to the full set (which re-triggers when a disabled option is selected 
alongside it), I've gated the sentinel detection off entirely in 
`stableSelectAll` mode — it adds real values with no phantom slot. Added a test 
that locks it. Thanks!



-- 
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]

Reply via email to