diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2022-11-02 11:08:39 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-11-02 20:03:01 +0000 |
commit | 2ab6fc273ecbf405f7c126fab11ddc0b9bf516da (patch) | |
tree | a6e005b4f57fb488d3e551b7df52399e69b0674c /server/sonar-web/src/main/js/components/controls/Dropdown.tsx | |
parent | 60e4b88e4567c1af3051b6cdc4c8858f8b0fca21 (diff) | |
download | sonarqube-2ab6fc273ecbf405f7c126fab11ddc0b9bf516da.tar.gz sonarqube-2ab6fc273ecbf405f7c126fab11ddc0b9bf516da.zip |
SONAR-13368 Bump to prettier@2.7.1
Diffstat (limited to 'server/sonar-web/src/main/js/components/controls/Dropdown.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/components/controls/Dropdown.tsx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/components/controls/Dropdown.tsx b/server/sonar-web/src/main/js/components/controls/Dropdown.tsx index 0d9ed80584b..308d2e4e395 100644 --- a/server/sonar-web/src/main/js/components/controls/Dropdown.tsx +++ b/server/sonar-web/src/main/js/components/controls/Dropdown.tsx @@ -68,13 +68,13 @@ export default class Dropdown extends React.PureComponent<Props, State> { event.preventDefault(); event.currentTarget.blur(); } - this.setState(state => ({ open: !state.open })); + this.setState((state) => ({ open: !state.open })); }; render() { const a11yAttrs = { 'aria-expanded': String(this.state.open), - 'aria-haspopup': 'true' + 'aria-haspopup': 'true', }; const child = React.isValidElement(this.props.children) @@ -82,7 +82,7 @@ export default class Dropdown extends React.PureComponent<Props, State> { : this.props.children({ closeDropdown: this.closeDropdown, onToggleClick: this.handleToggleClick, - open: this.state.open + open: this.state.open, }); const { closeOnClick = true, closeOnClickOutside = false } = this.props; @@ -96,10 +96,12 @@ export default class Dropdown extends React.PureComponent<Props, State> { overlay={ <DropdownOverlay noPadding={this.props.noOverlayPadding} - placement={this.props.overlayPlacement}> + placement={this.props.overlayPlacement} + > {this.props.overlay} </DropdownOverlay> - }> + } + > {child} </Toggler> ); @@ -138,7 +140,8 @@ export class DropdownOverlay extends React.Component<OverlayProps> { leftFix !== undefined && topFix !== undefined ? { marginLeft: `calc(50% + ${leftFix}px)` } : undefined - }> + } + > {this.props.children} </Popup> ); |