Skip to content

Commit 8acc158

Browse files
committed
Prepare 0.5.0 release
1 parent c48c610 commit 8acc158

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

README.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Also possible to change the current value using `value` property
104104
const { value } = this.props;
105105
106106
<Select2
107-
value={ value }
107+
value={ value }
108108
data={[
109109
{ text: 'bug', id: 1 },
110110
{ text: 'feature', id: 2 },
@@ -117,6 +117,27 @@ const { value } = this.props;
117117
/>
118118
```
119119

120+
### Option Groups
121+
122+
```js
123+
<Select2
124+
multiple
125+
data={[
126+
{ text: 'Development',
127+
children: [
128+
{ text: 'bug', id: 1 },
129+
{ text: 'feature', id: 2 },
130+
],
131+
},
132+
{ text: 'documents', id: 3 },
133+
{ text: 'discussion', id: 4 },
134+
]}
135+
options={{
136+
placeholder: 'search by tags',
137+
}}
138+
/>
139+
```
140+
120141
### Properties
121142

122143
You can pass any properties such as `class`, `id`, `data-*` attributes

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-select2-wrapper",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "React component for Select2",
55
"main": "lib/components/Select2.js",
66
"scripts": {

0 commit comments

Comments
 (0)