Skip to content

Commit

Permalink
fix(Dropdown): allow defaultValue to be a boolean (#2972)
Browse files Browse the repository at this point in the history
fix(Dropdown): allow `defaultValue` to be a boolean
  • Loading branch information
Leonard O' Sullivan authored and layershifter committed Jul 3, 2018
1 parent 1d795bc commit 33a49da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/Dropdown/Dropdown.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface DropdownProps {
defaultUpward?: boolean

/** Initial value or value array if multiple. */
defaultValue?: string | number | (number | string)[]
defaultValue?: string | number | boolean | (number | string | boolean)[]

/** A dropdown menu can open to the left or to the right. */
direction?: 'left' | 'right'
Expand Down
3 changes: 2 additions & 1 deletion src/modules/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ export default class Dropdown extends Component {
defaultValue: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string,
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
PropTypes.bool,
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool])),
]),

/** A dropdown menu can open to the left or to the right. */
Expand Down

0 comments on commit 33a49da

Please sign in to comment.