Skip to content

Commit

Permalink
fix(dropdown) menuAlign confers float; dropdown-menu-right wasn't
Browse files Browse the repository at this point in the history
working

[#141528275]

Signed-off-by: Tom Chen <tochen@pivotal.io>
  • Loading branch information
cwang-pivotal authored and chentom88 committed Mar 10, 2017
1 parent 11d76db commit ef1daaa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion library/src/pivotal-ui-react/dropdowns/dropdowns.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class Dropdown extends mixin(React.Component).with(Scrim, Transition) {
'dropdown-border' : border,
'dropdown-menu-right' : (menuAlign === 'right'),
'dropdown-menu-left' : (menuAlign === 'left'),
'dropdown-menu-float' : split || flat || link || floatMenu || noTitle,
'dropdown-menu-float' : split || flat || link || floatMenu || noTitle || menuAlign !== 'none',
'dropdown-menu-scroll': scroll
}
)
Expand Down
1 change: 1 addition & 0 deletions library/src/pivotal-ui/components/dropdowns/dropdowns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
}
&.dropdown-menu-right {
right:0;
left: inherit;
text-align: right;
ul {
float:right;
Expand Down
16 changes: 8 additions & 8 deletions styleguide/docs/react/dropdowns.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,18 @@ exceeds the parent dropdown width.
</div>
<div className="form-group form-inline">
<Dropdown title='Pinned Left' floatMenu menuAlign='left'>
<DropdownItem href="#">Note that this option exceeds the width of the parent dropdown toggle</DropdownItem>
<DropdownItem href="#">lorem ipsum</DropdownItem>
<DropdownItem href="#">lorem ipsum</DropdownItem>
<Dropdown title='Pinned Left' floatMenu menuAlign='left'>
<DropdownItem href="#">Note that this option exceeds the width of the parent dropdown toggle</DropdownItem>
<DropdownItem href="#">lorem ipsum</DropdownItem>
<DropdownItem href="#">lorem ipsum</DropdownItem>
</Dropdown>
</div>
<div className="form-group form-inline">
<Dropdown title='Pinned Right' floatMenu menuAlign='right'>
<DropdownItem href="#">lorem ipsum</DropdownItem>
<DropdownItem href="#">lorem ipsum</DropdownItem>
<DropdownItem href="#">lorem ipsum</DropdownItem>
<Dropdown title='Pinned Right' floatMenu menuAlign='right'>
<DropdownItem href="#">lorem ipsum</DropdownItem>
<DropdownItem href="#">lorem ipsum</DropdownItem>
<DropdownItem href="#">lorem ipsum</DropdownItem>
</Dropdown>
</div>
</div>
Expand Down

0 comments on commit ef1daaa

Please sign in to comment.