Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras committed Oct 17, 2019
1 parent e3e2436 commit 70ae1d5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/components/src/custom-select/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import classnames from 'classnames';
/**
* Internal dependencies
*/
import { Button, Dashicon } from '../';
import { Button, Dashicon, Popover } from '../';

const itemToString = ( item ) => item.name;
// This is needed so that in Windows, where
Expand Down Expand Up @@ -107,11 +107,12 @@ export default function CustomSelect( { label, items } ) {
className="components-custom-select__button-icon"
/>
</Button>
<ul { ...menuProps }>
{ isOpen &&
<Popover position="bottom">
<ul { ...menuProps }>
{ isOpen &&
items.map( ( item, index ) => (
// eslint-disable-next-line react/jsx-key
<li
<button
{ ...getItemProps( {
item,
index,
Expand All @@ -131,9 +132,10 @@ export default function CustomSelect( { label, items } ) {
/>
) }
{ item.name }
</li>
</button>
) ) }
</ul>
</ul>
</Popover>
</div>
);
}

0 comments on commit 70ae1d5

Please sign in to comment.