Skip to content

Commit

Permalink
Merge pull request #63 from selvagsz/api/horizontal_postion
Browse files Browse the repository at this point in the history
[Feature] Support horizontalPostion: 'left'|'right'
  • Loading branch information
selvagsz committed Oct 12, 2019
2 parents 2e8914d + ae07364 commit fac0738
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import cx from 'classnames';

export default class Dropdown extends Component {
render() {
let { className, children } = this.props;
let { className, horizontalPosition, children } = this.props;
return (
<TetherComponent
className={cx('PowerSelect__Tether', className && `${className}__Tether`)}
attachment="top left"
targetAttachment="bottom left"
attachment={`top ${horizontalPosition}`}
targetAttachment={`bottom ${horizontalPosition}`}
constraints={[
{
to: 'window',
Expand Down
4 changes: 3 additions & 1 deletion src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ export default class Select extends Component {
optionComponent,
placeholder,
disabled,
horizontalPosition,
selectedOptionComponent,
selectedOptionLabelPath,
triggerLHSComponent,
Expand All @@ -359,7 +360,7 @@ export default class Select extends Component {
let selectApi = this.getPublicApi();

return (
<Dropdown className={className}>
<Dropdown className={className} horizontalPosition={horizontalPosition}>
<div
ref={powerselect => {
this.powerselect = powerselect;
Expand Down Expand Up @@ -438,6 +439,7 @@ Select.defaultProps = {
selectedOptionComponent: null,
beforeOptionsComponent: null,
afterOptionsComponent: null,
horizontalPosition: 'left',
matcher: matcher,
onFocus: noop,
onBlur: noop,
Expand Down

0 comments on commit fac0738

Please sign in to comment.