react-select-search
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -89,7 +89,16 @@ 'use strict'; | ||
var value = !props.value && props.multiple ? [] : props.value; | ||
var search = ''; | ||
if (value) { | ||
var option = _this.findByValue(options, value); | ||
if (option) { | ||
search = option.name; | ||
} | ||
} | ||
_this.placeSelectedFirst(options, value); | ||
_this.state = { | ||
search: '', | ||
search: search, | ||
value: value, | ||
@@ -96,0 +105,0 @@ defaultOptions: props.options, |
{ | ||
"name": "react-select-search", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "React powered selectbox with filter", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -61,7 +61,16 @@ import React from 'react'; | ||
let value = (!props.value && props.multiple) ? [] : props.value; | ||
let search = ''; | ||
if (value) { | ||
let option = this.findByValue(options, value); | ||
if (option) { | ||
search = option.name; | ||
} | ||
} | ||
this.placeSelectedFirst(options, value); | ||
this.state = { | ||
search : '', | ||
search : search, | ||
value : value, | ||
@@ -68,0 +77,0 @@ defaultOptions : props.options, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56630
1201