dosubot[bot] commented on issue #40228: URL: https://github.com/apache/superset/issues/40228#issuecomment-4481478876
<!-- Greeting --> Hi @mason-gordon! I'm [Dosu](https://go.dosu.dev/dosubot) and Iām helping the superset team. <!-- Answer --> This looks like a legitimate bug. The issue is a mismatch between how `bulkSelectCounts.selectable` is calculated versus how `handleSelectAll` actually selects items. **The count** (`bulkSelectCounts.selectable`) iterates over `visibleOptions` and counts any option that is not disabled (or is already selected) and is not a new unsaved option ā it does **not** exclude null/falsy values [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx#L241-L264). **The selection** (`handleSelectAll`) filters with `option.value &&`, which excludes null/falsy values from actually being selected [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx#L419). So `<NULL>` gets counted in the display number but is skipped during actual selection ā exactly the behavior you're seeing. A fix would be to align the two by adding the same falsy-value check to the `bulkSelectCounts` computation, e.g.: ```typescript if ( option.value && // ā add this to match handleSelectAll (!isDisabled || isSelected) && ((isNew && isSelected) || !isNew) ) { acc.selectable += 1; } ``` This is in [`superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx`](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=08ea5f0c-f2e3-45f6-908c-ae7381dfa530) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset) -- 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]
