Skip to content

Commit a93cc12

Browse files
committed
1 parent 3032031 commit a93cc12

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

API.md

+4
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@
1919
| groups | [Group] | collection of objects where each object must atleast have a groupId property|
2020
| groupsAsColumns | Boolean | display option groups in columns|
2121
| hideResetButton | Boolean | hides the reset button, even if the select element is not empty |
22+
| highlightedUid | object | the uid (unique id) of the currently highlighted option, uid of an option is obtained from the `uid` prop defined below |
2223
| name | String | defaults to undefined, provide a name property to create an hidden input element for html form serialization |
2324
| open | Boolean | controls the visibility of the dropdown menu |
2425
| onBlur | Event -> Void | `({originalEvent :: e, value :: Item, open :: Boolean}){}` |
2526
| onFocus | Event -> Void | `({originalEvent :: e, value :: Item, open :: Boolean}){}` |
27+
| onHighlightedUidChange | object -> Void | `(uid){}` invoked when the highlighted option changes |
2628
| onKeyboardSelectionFailed | Int -> Void | `(keyCode){}` fired when the user hits the return key on an empty list of options |
2729
| onOpenChange | Boolean -> Void | `(open){}` open is true if the dropdown opened and false if it closed|
30+
| onPaste | Event -> Void | invoked when the user pastes text in the input field and `props.valueFromPaste` is not specified|
2831
| onSearchChange | String -> Void | `(search){}` invoked when the search text in the input field changes|
2932
| onValueChange | Item -> Void | `(selectedValue){}` invoked when the user selects an option (by click on enter)|
3033
| options | [Item] | list of items by default each option object MUST have label & value property, otherwise you must implement the render* & filterOptions methods|
@@ -48,6 +51,7 @@
4851
| transitionLeaveTimeout | Number | duration specified in milliseconds, it must match the transition duration specified under the CSS class `.slide-leave-active` |
4952
| uid | (Eq e) => Item -> e | `(item){return item.value}` returns a unique id for a given option, defaults to the value property|
5053
| value | Item | the selected value, i.e. one of the objects in the options array|
54+
| valueFromPaste | [Item] -> Item -> String -> Item | `(options, value, pastedText){}` invoked when the user pastes text in the input field, here you can convert the pasted text into an item that will then show up as selected |
5155

5256
### SimpleSelect methods
5357

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# React Selectize
22

3+
## v0.9.0 / 18th March 2016
4+
* added `on-paste` and `value-from-paste` props to `SimpleSelect`
5+
* added `highlighted-uid` and `on-highlighted-uid-change` props to track the current highlighted option
6+
* fixed a bug in `dropdown-direction` prop
7+
38
## v0.8.4 / 4th March 2016
49
* added `tether-props` prop to customize the parent element (defaults to body)
510
* expose `highlighted-ui` & `on-highlighted-uid-change` props for `MultiSelect`

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ styles & features inspired by [React Select](http://jedwatson.github.io/react-se
1313

1414
[![](http://i.imgsafe.co/rQmogzn.gif)](http://furqanZafar.github.io/react-selectize/)
1515

16-
- [Changelog](CHANGELOG.md) (last updated on 4th March 2016)
16+
- [Changelog](CHANGELOG.md) (last updated on 18th March 2016)
1717
- [API Reference](API.md)
1818

1919
# Motivation
@@ -51,7 +51,7 @@ to include the default styles add the following import statement to your stylus
5151
`@import 'node_modules/react-selectize/themes/index.css'`
5252

5353
* **bower:**
54-
`bower install https://npmcdn.com/react-selectize@0.8.4/bower.zip`
54+
`bower install https://npmcdn.com/react-selectize@0.9.0/bower.zip`
5555

5656
* **1998 script tag:**
5757
```html
@@ -66,10 +66,10 @@ to include the default styles add the following import statement to your stylus
6666
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.1.1/js/tether.min.js" type="text/javascript" ></script>
6767

6868
<!-- REACT SELECTIZE -->
69-
<script src="https://npmcdn.com/react-selectize@0.8.4/dist/index.min.js" type="text/javascript" ></script>
69+
<script src="https://npmcdn.com/react-selectize@0.9.0/dist/index.min.js" type="text/javascript" ></script>
7070

7171
<!-- THEMES (default, bootstrap3, material) -->
72-
<link rel="stylesheet" href="https://npmcdn.com/react-selectize@0.8.4/dist/index.min.css"/>
72+
<link rel="stylesheet" href="https://npmcdn.com/react-selectize@0.9.0/dist/index.min.css"/>
7373

7474
</head>
7575
</html>

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-selectize",
3-
"version": "0.8.4",
3+
"version": "0.9.0",
44
"homepage": "https://github.com/furqanZafar/react-selectize",
55
"authors": [
66
"Furqan Zafar (Mac Pro) <[email protected]>"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-selectize",
3-
"version": "0.8.4",
3+
"version": "0.9.0",
44
"description": "A Stateless & Flexible Select component for React inspired by Selectize",
55
"main": "src/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)