Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/src/components/AllowCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import Select from 'react-select';

const FLAVOURS = [
{ label: 'Chocolate', value: 'chocolate' },
{ label: 'Chocolate', value: 42 },
{ label: 'Vanilla', value: 'vanilla' },
{ label: 'Strawberry', value: 'strawberry' },
{ label: 'Caramel', value: 'caramel' },
Expand Down
2 changes: 1 addition & 1 deletion src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ const Select = React.createClass({
let addNewOption = true;
//NOTE: only add the "Add" option if none of the options are an exact match
filteredOptions.map(option => {
if (option.label.toLowerCase() === filterValue || option.value.toLowerCase() === filterValue) {
if (String(option.label).toLowerCase() === filterValue || String(option.value).toLowerCase() === filterValue) {
addNewOption = false;
}
});
Expand Down