Skip to content

Commit

Permalink
fix: fix for single dropdown menu (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
flops authored Jul 18, 2024
1 parent 279cf1e commit 3cc4ffc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/OverlayControls/OverlayControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class OverlayControls extends React.Component<OverlayControlsProps> {
private renderMenu(isOnlyOneItem: boolean) {
const {view, size} = this.props;

const dropdown = this.renderDropdownMenu();
const dropdown = this.renderDropdownMenu(isOnlyOneItem);

if (dropdown) {
return dropdown;
Expand All @@ -241,7 +241,7 @@ class OverlayControls extends React.Component<OverlayControlsProps> {
(Object.values(MenuItems) as Array<string>).includes(String(item)),
);
}
private renderDropdownMenu() {
private renderDropdownMenu(isOnlyOneItem: boolean) {
const {view, size} = this.props;
const {menu: contextMenu, itemsParams, itemsState} = this.context;

Expand Down Expand Up @@ -302,7 +302,7 @@ class OverlayControls extends React.Component<OverlayControlsProps> {
{...props}
view={view}
size={size}
pin="brick-round"
pin={isOnlyOneItem ? 'round-round' : 'brick-round'}
qa="dashkit-overlay-control-menu"
>
<Icon data={DotsIcon} size="16" />
Expand Down

0 comments on commit 3cc4ffc

Please sign in to comment.