File tree Expand file tree Collapse file tree
app/configurator/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 FormControlLabel ,
1313 FormControlLabelProps ,
1414 Badge ,
15+ BadgeProps ,
1516} from "@mui/material" ;
1617import { makeStyles } from "@mui/styles" ;
1718import isEmpty from "lodash/isEmpty" ;
@@ -493,15 +494,15 @@ const InteractiveDataFilterCheckbox = ({
493494 ) ;
494495} ;
495496
496- const FiltersBadge = ( ) => {
497+ const FiltersBadge = ( { sx } : { sx ?: BadgeProps [ "sx" ] } ) => {
497498 const ctx = useControlSectionContext ( ) ;
498499 const [ state ] = useConfiguratorState ( isConfiguring ) ;
499500 return (
500501 < Badge
501502 invisible = { ctx . isOpen }
502503 badgeContent = { Object . values ( state . chartConfig . filters ) . length }
503504 color = "secondary"
504- sx = { { display : "block" , mr : 4 } }
505+ sx = { { display : "block" , ... sx } }
505506 />
506507 ) ;
507508} ;
@@ -576,19 +577,15 @@ export const ChartConfigurator = ({
576577 { filterDimensions . length === 0 &&
577578 addableDimensions . length === 0 ? null : (
578579 < ControlSection className = { classes . filterSection } collapse >
579- < SectionTitle
580- titleId = "controls-data"
581- gutterBottom = { false }
582- sx = { { justifyContent : "space-between" } }
583- >
580+ < SectionTitle titleId = "controls-data" gutterBottom = { false } >
584581 < Trans id = "controls.section.data.filters" > Filters</ Trans > { " " }
585582 { fetching ? (
586583 < CircularProgress
587584 size = { 12 }
588585 className = { classes . loadingIndicator }
589586 />
590587 ) : null }
591- < FiltersBadge />
588+ < FiltersBadge sx = { { ml : "auto" , mr : 4 } } />
592589 </ SectionTitle >
593590
594591 < ControlSectionContent
You can’t perform that action at this time.
0 commit comments