react-selectize
Advanced tools
Comparing version 0.0.10 to 0.0.11
{ | ||
"name": "react-selectize", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "react implementation of selectize", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -86,21 +86,21 @@ # React Selecitze | ||
Property | Type | Description | ||
:---------------------------|:-----------------------------------|:-------------------------------- | ||
className | String | class name for the outer element, in addition to "simple-select" | ||
disabled | Boolean | disables interaction with the Select control | ||
createFromSearch | [Item] -> String -> Item? | implement this function to create new items on the fly, function(options, search){return {label: search, value: search}}, return null to avoid option creation for the given parameters | ||
filterOptions | [Item] -> Item -> String -> [Item] | implement this function for custom filtering logic, function(options, value, search) {return options} | ||
onBlur | Item -> String -> Void | function(value, reason){} reason can be either "click" (loss of focus because the user clicked elsewhere), "tab" or "blur" (invoked refs.simpleSelect.blur()) | ||
onFocus | Item -> String -> Void | function(value, reason){} reason can be either "event" (when the control gains focus outside) or "focus" (when the user invokes refs.simpleSelect.focus()) | ||
onSearchChange | String -> (a -> Void) -> Void | function(search, callback){self.setState({search: search}, callback);} or function(search,callback){callback();} i.e. callback MUST always be invoked | ||
onValueChange | Item -> (a -> Void) -> Void | function(selectedValue, callback){self.setState({selectedValue: selectedValue}, callback)} or function(value, callback){callback()} i.e. callback MUST always be invoked | ||
options | [Item] | list of items by default each option object MUST have label & value property, otherwise you must implement the render* & filterOptions methods | ||
placeholder: | String | displayed when there is no value | ||
renderNoResultsFound | Item -> String -> ReactElement | function(item, search){return React.DOM.div(null);} returns a custom way for rendering the "No results found" error | ||
renderOption | Int -> Item -> ReactElement | function(index, item){return React.DOM.div(null);} returns a custom way for rendering each option | ||
renderValue | Int -> Item -> ReactElement | function(index, item){return React.DOM.div(null);} returns a custom way for rendering the selected value | ||
restoreOnBackspace | Item -> String | function(item){return item.label;} implement this method if you want to go back to editing the item when the user hits the [backspace] key instead of getting removed | ||
search | String | the text displayed in the search box | ||
style | Object | the CSS styles for the outer element | ||
value | Item | the selected value, i.e. one of the objects in the options array | ||
| Property | Type | Description | ||
|----------------------------|------------------------------------|-------------------------------- | ||
| className | String | class name for the outer element, in addition to "simple-select" | ||
| disabled | Boolean | disables interaction with the Select control | ||
| createFromSearch | [Item] -> String -> Item? | implement this function to create new items on the fly, function(options, search){return {label: search, value: search}}, return null to avoid option creation for the given parameters | ||
| filterOptions | [Item] -> Item -> String -> [Item] | implement this function for custom filtering logic, function(options, value, search) {return options} | ||
| onBlur | Item -> String -> Void | function(value, reason){} reason can be either "click" (loss of focus because the user clicked elsewhere), "tab" or "blur" (invoked refs.simpleSelect.blur()) | ||
| onFocus | Item -> String -> Void | function(value, reason){} reason can be either "event" (when the control gains focus outside) or "focus" (when the user invokes refs.simpleSelect.focus()) | ||
| onSearchChange | String -> (a -> Void) -> Void | function(search, callback){self.setState({search: search}, callback);} or function(search,callback){callback();} i.e. callback MUST always be invoked | ||
| onValueChange | Item -> (a -> Void) -> Void | function(selectedValue, callback){self.setState({selectedValue: selectedValue}, callback)} or function(value, callback){callback()} i.e. callback MUST always be invoked | ||
| options | [Item] | list of items by default each option object MUST have label & value property, otherwise you must implement the render* & filterOptions methods | ||
| placeholder: | String | displayed when there is no value | ||
| renderNoResultsFound | Item -> String -> ReactElement | function(item, search){return React.DOM.div(null);} returns a custom way for rendering the "No results found" error | ||
| renderOption | Int -> Item -> ReactElement | function(index, item){return React.DOM.div(null);} returns a custom way for rendering each option | ||
| renderValue | Int -> Item -> ReactElement | function(index, item){return React.DOM.div(null);} returns a custom way for rendering the selected value | ||
| restoreOnBackspace | Item -> String | function(item){return item.label;} implement this method if you want to go back to editing the item when the user hits the [backspace] key instead of getting removed | ||
| search | String | the text displayed in the search box | ||
| style | Object | the CSS styles for the outer element | ||
| value | Item | the selected value, i.e. one of the objects in the options array | ||
@@ -110,9 +110,9 @@ ## MultiSelect Props | ||
Property | Type | Description | ||
:---------------------------|:-------------------------------------|:-------------------------------- | ||
createFromSearch | [Item] -> [Item] -> String -> Item? | function(options, values, search){return {label: search, value: search}} | ||
filterOptions | [Item] -> [Item] -> String -> [Item] | function(options, values, search){return options} | ||
onBlur | [Item] -> String -> Void | function(values, reason){} | ||
onFocus | [Item] -> String -> Void | function(values, reason){} | ||
onValuesChange | [Item] -> (a -> Void) -> Void | function(values, callback){callback();} | ||
| Property | Type | Description | ||
|--------------------------- |--------------------------------------|--------------------------------- | ||
| createFromSearch | [Item] -> [Item] -> String -> Item? | function(options, values, search){return {label: search, value: search}} | ||
| filterOptions | [Item] -> [Item] -> String -> [Item] | function(options, values, search){return options} | ||
| onBlur | [Item] -> String -> Void | function(values, reason){} | ||
| onFocus | [Item] -> String -> Void | function(values, reason){} | ||
| onValuesChange | [Item] -> (a -> Void) -> Void | function(values, callback){callback();} | ||
@@ -119,0 +119,0 @@ ## Development |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
63206
0