File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,18 @@ import MultiSelect from 'react-native-multiple-select';
39
39
class MultiSelectExample extends Component {
40
40
41
41
state = {
42
- selectedItems = [];
42
+ selectedItems : [];
43
43
};
44
44
45
- items = [{
45
+
46
+ onSelectedItemsChange = selectedItems => {
47
+ this .setState ({ selectedItems });
48
+ };
49
+
50
+ render () {
51
+ const { selectedItems } = this .state ;
52
+
53
+ const items = [{
46
54
id: ' 92iijs7yta' ,
47
55
name: ' Ondo' ,
48
56
}, {
@@ -71,12 +79,6 @@ class MultiSelectExample extends Component {
71
79
name: ' Abuja' ,
72
80
}];
73
81
74
- onSelectedItemsChange = selectedItems => {
75
- this .setState ({ selectedItems });
76
- };
77
-
78
- render () {
79
- const { selectedItems } = this .state ;
80
82
return (
81
83
< View style= {{ flex: 1 }}>
82
84
< MultiSelect
You can’t perform that action at this time.
0 commit comments