diff --git a/superset-frontend/src/components/Button/index.tsx b/superset-frontend/src/components/Button/index.tsx index 62e1214d3dffc..5199d26f4f8a2 100644 --- a/superset-frontend/src/components/Button/index.tsx +++ b/superset-frontend/src/components/Button/index.tsx @@ -63,6 +63,7 @@ export interface ButtonProps { htmlType?: 'button' | 'submit' | 'reset'; cta?: boolean; loading?: boolean | { delay?: number | undefined } | undefined; + showMarginRight?: boolean; } export default function Button(props: ButtonProps) { @@ -76,6 +77,7 @@ export default function Button(props: ButtonProps) { cta, children, href, + showMarginRight = true, ...restProps } = props; @@ -154,8 +156,8 @@ export default function Button(props: ButtonProps) { } else { renderedChildren = Children.toArray(children); } - - const firstChildMargin = renderedChildren.length > 1 ? theme.gridUnit * 2 : 0; + const firstChildMargin = + showMarginRight && renderedChildren.length > 1 ? theme.gridUnit * 2 : 0; const button = (   diff --git a/superset-frontend/src/explore/components/ControlHeader.jsx b/superset-frontend/src/explore/components/ControlHeader.jsx index 9a45917f6cf77..9d0a0ac3b409c 100644 --- a/superset-frontend/src/explore/components/ControlHeader.jsx +++ b/superset-frontend/src/explore/components/ControlHeader.jsx @@ -37,6 +37,7 @@ const propTypes = { tooltipOnClick: PropTypes.func, warning: PropTypes.string, danger: PropTypes.string, + hideNativeTab: PropTypes.bool, }; const defaultProps = { @@ -44,6 +45,7 @@ const defaultProps = { renderTrigger: false, hovered: false, name: undefined, + hideNativeTab: false, }; class ControlHeader extends React.Component { @@ -93,8 +95,7 @@ class ControlHeader extends React.Component { const labelClass = this.props.validationErrors.length > 0 ? 'text-danger' : ''; - const { theme } = this.props; - + const { theme, hideNativeTab } = this.props; return (
@@ -106,11 +107,13 @@ class ControlHeader extends React.Component { > {this.props.leftNode && {this.props.leftNode}} {this.props.label} {' '} diff --git a/superset-frontend/src/explore/components/controls/SelectControl.jsx b/superset-frontend/src/explore/components/controls/SelectControl.jsx index 6bfcecec78fe5..9a456eda69173 100644 --- a/superset-frontend/src/explore/components/controls/SelectControl.jsx +++ b/superset-frontend/src/explore/components/controls/SelectControl.jsx @@ -282,7 +282,6 @@ export default class SelectControl extends React.PureComponent { valueKey, valueRenderer, }; - let SelectComponent; if (this.props.freeForm) { SelectComponent = CreatableSelect; @@ -301,7 +300,9 @@ export default class SelectControl extends React.PureComponent { } `} > - {this.props.showHeader && } + {this.props.showHeader && ( + + )} {isMulti ? ( ) : (