
Smart Select React Component
Smart Select allows you to easily convert your usual form selects to dynamic pages with grouped radio inputs. You can see such feature in many native apps.
It is not a separate React component, but just a particular case of using and components with Framework7’s Smart Select component.
Smart Select Properties
| Prop | Type | Default | Description |
|---|---|---|---|
| <ListItem> properties | |||
| --- | --- | --- | --- |
| smartSelect | boolean | Enables Smart Select behavior | |
| smartSelectParams | object | Object with Smart Select Parameters |
Access To Smart Select Instance
You can access Smart Select initialized instance by accessing **.f7SmartSelect** property of <ListItem> component.
Examples
1. <List>
3. <ListItem
4. title="Fruit"
5. smartSelect
6. >
7. <select name="fruits" defaultValue="apple">
8. <option value="apple">Apple</option>
9. <option value="pineapple">Pineapple</option>
10. <option value="pear">Pear</option>
11. <option value="orange">Orange</option>
12. <option value="melon">Melon</option>
13. <option value="peach">Peach</option>
14. <option value="banana">Banana</option>
15. </select>
16. </ListItem>
18. <ListItem
19. title="Car"
20. smartSelect
21. smartSelectParams={{openIn: 'popup', searchbar: true, searchbarPlaceholder: 'Search car'}}
22. >
23. <select name="car" multiple defaultValue={['honda', 'audi', 'ford']}>
24. <optgroup label="Japanese">
25. <option value="honda">Honda</option>
26. <option value="lexus">Lexus</option>
27. <option value="mazda">Mazda</option>
28. <option value="nissan">Nissan</option>
29. <option value="toyota">Toyota</option>
30. </optgroup>
31. <optgroup label="German">
32. <option value="audi">Audi</option>
33. <option value="bmw">BMW</option>
34. <option value="mercedes">Mercedes</option>
35. <option value="vw">Volkswagen</option>
36. <option value="volvo">Volvo</option>
37. </optgroup>
38. <optgroup label="American">
39. <option value="cadillac">Cadillac</option>
40. <option value="chrysler">Chrysler</option>
41. <option value="dodge">Dodge</option>
42. <option value="ford">Ford</option>
43. </optgroup>
44. </select>
45. </ListItem>
47. <ListItem
48. title="Mac or Windows"
49. smartSelect
50. smartSelectParams={{openIn: 'sheet'}}
51. >
52. <select name="mac-windows" defaultValue="mac">
53. <option value="mac">Mac</option>
54. <option value="windows">Windows</option>
55. </select>
56. </ListItem>
58. <ListItem
59. title="Super Hero"
60. smartSelect
61. smartSelectParams={{openIn: 'popover'}}
62. >
63. <select name="superhero" multiple defaultValue={['Batman']}>
64. <option value="Batman">Batman</option>
65. <option value="Superman">Superman</option>
66. <option value="Hulk">Hulk</option>
67. <option value="Spiderman">Spiderman</option>
68. <option value="Ironman">Ironman</option>
69. <option value="Thor">Thor</option>
70. <option value="Wonder Woman">Wonder Woman</option>
71. </select>
72. </ListItem>
73. </List>
