Skip to content

Commit

Permalink
Also pass options as the input param
Browse files Browse the repository at this point in the history
  • Loading branch information
Chopinsky committed Nov 30, 2017
1 parent 5127be1 commit ad0d97e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Creatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CreatableSelect extends React.Component {

if (isValidNewOption({ label: this.inputValue })) {
const option = newOptionCreator({ label: this.inputValue, labelKey: this.labelKey, valueKey: this.valueKey });
const isOptionUnique = this.isOptionUnique({ option });
const isOptionUnique = this.isOptionUnique({ option, options });

// Don't add the same option twice.
if (isOptionUnique) {
Expand Down

0 comments on commit ad0d97e

Please sign in to comment.