EnxDev commented on code in PR #33043:
URL: https://github.com/apache/superset/pull/33043#discussion_r2040734798
##########
superset-frontend/src/components/Select/Select.tsx:
##########
@@ -239,6 +237,23 @@ const Select = forwardRef(
[selectValue, selectAllEligible],
);
+ useEffect(() => {
+ const selectedValues = ensureIsArray(selectValue);
+ const selectable = visibleOptions.filter(
+ option =>
+ (!option.disabled || hasOption(option.value, selectedValues)) &&
+ !option.isNewOption,
+ ).length;
+ const deselectable = visibleOptions.filter(
+ option => !option.disabled && hasOption(option.value, selectedValues),
+ ).length;
Review Comment:
Could it be done with just a single loop?
##########
superset-frontend/src/components/Select/styles.tsx:
##########
@@ -138,3 +136,19 @@ export const StyledErrorMessage = styled.div`
overflow: hidden;
text-overflow: ellipsis;
`;
+
+export const StyledBulkActionsContainer = styled(Space)`
+ ${({ theme }) => `
+ padding: ${theme.gridUnit * 2}px;
+ display: flex;
+ justify-content: center;
Review Comment:
Should be styled(Flex) ?
--
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]