rusackas commented on code in PR #40970:
URL: https://github.com/apache/superset/pull/40970#discussion_r4077717541
##########
superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx:
##########
@@ -102,14 +102,32 @@ const StyledSpace = styled(Space)<{
width: 100%;
.exclude-select {
- width: 80px;
- flex-shrink: 0;
+ width: 100%;
+ min-width: 80px;
}
&.ant-space {
.ant-space-item {
width: ${({ inverseSelection }) => (!inverseSelection ? '100%' :
'auto')};
}
+
+ ${({ inverseSelection }) =>
+ inverseSelection &&
+ `
+ .ant-space-item:first-of-type {
+ flex: 1 1 25%;
+ }
+
+ .ant-space-item:last-child {
+ flex: 3 1 75%;
+ min-width: 0;
+ }
+
+ .select-container {
+ width: 100% !important;
+ max-width: none !important;
+ }
+ `}
Review Comment:
Same thing CodeAnt flagged back in June, and the mechanics check out the
same way I verified in my approval. With only one `.ant-space-item` in the
modal, `:last-child` does win the cascade over `:first-of-type` like you say,
but `flex: 3 1 75%` isn't a fixed 75%, it's basis 75% plus grow 3. With nothing
else in the row to share the leftover 25% with, that single item absorbs all of
it and lands at 100%, matching what I saw rendering it in a headless browser.
Resolving.
--
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]