Skip to content

Commit

Permalink
Merge pull request #26 from indec-it/refactor/dropdown
Browse files Browse the repository at this point in the history
refactor(dropdown): remove menuPortalTarget and add props
  • Loading branch information
mdumrauf authored Jun 12, 2019
2 parents e3467fb + a6ffe65 commit 01a7781
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/components/Dropdown.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
/* global document */
import React from 'react';
import PropTypes from 'prop-types';
import {ControlLabel, FormGroup} from 'react-bootstrap';
import Select from 'react-select';
import {find, isNil} from 'lodash';

const Dropdown = ({
value, control, label, getOptionValue, getOptionLabel, disabled, placeholder, options, onChange, isClearable
value,
control,
label,
getOptionValue,
getOptionLabel,
disabled,
placeholder,
options,
onChange,
isClearable,
...props
}) => (
<FormGroup controlId={control}>
{label && (
Expand All @@ -25,7 +34,7 @@ const Dropdown = ({
{...{
options, getOptionValue, getOptionLabel, isClearable, placeholder
}}
menuPortalTarget={document.querySelector('body')}
{...props}
/>
</FormGroup>
);
Expand Down

0 comments on commit 01a7781

Please sign in to comment.