Skip to content

Commit

Permalink
Merge pull request #268 from WTTJ/FIX-select-isValuexisting
Browse files Browse the repository at this point in the history
fix: select isValueExisting buggy function
  • Loading branch information
theo-mesnil authored Aug 5, 2019
2 parents 3182c73 + b5d422a commit 804cb9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Select/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const EMPTY = ''
const itemToString = item => (item ? item.label : '')
const ensureArray = value => (Array.isArray(value) ? value : value ? [value] : [])
const getUniqueValue = (item, values) => uniqBy([...values, item], item => item.value)
const isValueExisting = (value, values) => values.find(item => item.value === kebabCase(value))
const isValueExisting = (value, values) =>
values.find(item => kebabCase(item.value) === kebabCase(value))
const defaultRenderOption = option => (option ? option.label : EMPTY)

export const Select = forwardRef(
Expand Down

1 comment on commit 804cb9c

@vercel
Copy link

@vercel vercel bot commented on 804cb9c Aug 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.