Skip to content

Commit

Permalink
fix(Select): add disabled state
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxuoz committed Nov 8, 2018
1 parent 5eedcaf commit 3033753
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/atoms/dataEntry/Select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type SelectProps = {|
placeholder?: string,
value?: Object,
loading?: boolean,
disabled?: boolean,
hasError?: boolean,
zIndex?: string | number,
|};
Expand Down Expand Up @@ -42,11 +43,12 @@ const customStyles = ({ hasError, zIndex = Z_INDEX.DROPDOWN }) => ({
}),
});

const Select = ({ loading, ...props }: SelectProps) => (
const Select = ({ loading, disabled, ...props }: SelectProps) => (
<SelectTag
{ ...props }
isClearable={ false }
isLoading={ loading }
isDisabled={ disabled }
tagName={ ReactSelect }
styles={ customStyles(props) }
menuPortalTarget={ document.body }
Expand Down

0 comments on commit 3033753

Please sign in to comment.