mirror of
https://github.com/apache/superset.git
synced 2026-06-01 05:39:17 +00:00
fix(dashboard): align filter bar elements vertically in horizontal mode (#36036)
This commit is contained in:
committed by
GitHub
parent
4376476ec4
commit
d123249bd2
@@ -49,7 +49,9 @@ const LoaderWrapper = styled.div<{
|
||||
|
||||
&.inline-centered {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
&.floating {
|
||||
position: absolute;
|
||||
|
||||
@@ -152,7 +152,6 @@ const ActionButtons = ({
|
||||
<Button
|
||||
disabled={!isClearAllEnabled}
|
||||
buttonStyle="link"
|
||||
buttonSize="small"
|
||||
className="filter-clear-all-button"
|
||||
onClick={onClearAll}
|
||||
{...getFilterBarTestId('clear-button')}
|
||||
|
||||
@@ -53,6 +53,7 @@ const VerticalFilterControlTitle = styled.h4`
|
||||
const HorizontalFilterControlTitle = styled(VerticalFilterControlTitle)`
|
||||
font-weight: ${({ theme }) => theme.fontWeightNormal};
|
||||
color: ${({ theme }) => theme.colorText};
|
||||
margin: 0;
|
||||
${truncationCSS};
|
||||
`;
|
||||
|
||||
@@ -60,6 +61,7 @@ const HorizontalOverflowFilterControlTitle = styled(
|
||||
HorizontalFilterControlTitle,
|
||||
)`
|
||||
max-width: none;
|
||||
margin: ${({ theme }) => `${theme.sizeUnit * 2}px 0 ${theme.sizeUnit}px`};
|
||||
`;
|
||||
|
||||
const VerticalFilterControlTitleBox = styled.div`
|
||||
@@ -162,7 +164,7 @@ const HorizontalFormItem = styled(StyledFormItem)<{
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ant-form-item-label {
|
||||
&& > .ant-row > .ant-form-item-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: visible;
|
||||
|
||||
@@ -62,7 +62,15 @@ import { useFilterOutlined } from '../useFilterOutlined';
|
||||
const HEIGHT = 32;
|
||||
|
||||
// Overrides superset-ui height with min-height
|
||||
const StyledDiv = styled.div`
|
||||
const StyledDiv = styled.div<{
|
||||
orientation: FilterBarOrientation;
|
||||
overflow: boolean;
|
||||
}>`
|
||||
padding-bottom: ${({ theme, orientation, overflow }) =>
|
||||
orientation === FilterBarOrientation.Horizontal && !overflow
|
||||
? 0
|
||||
: (theme?.sizeUnit ?? 4)}px;
|
||||
|
||||
& > div {
|
||||
height: auto !important;
|
||||
min-height: ${HEIGHT}px;
|
||||
@@ -353,7 +361,11 @@ const FilterValue: FC<FilterControlProps> = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<StyledDiv data-test="form-item-value">
|
||||
<StyledDiv
|
||||
data-test="form-item-value"
|
||||
orientation={orientation}
|
||||
overflow={overflow}
|
||||
>
|
||||
{isLoading ? (
|
||||
<Loading position="inline-centered" size="s" muted />
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user