Commit 999cded
Picker selection control bar and toggle all items functionality (#3557)
* Picker selection control bar and toggle all items functionality
* Refactor PickerScreen layout
* Rename PickerSelectionControlBar to PickerSelectionStatusToolbar and update related references
* Enhance selection status label functionality in PickerSelectionStatusToolbar
* Refactor PickerSelectionStatusToolbar and types for improved selection handling
* Remove 'none' option from select all types in Picker and update related types
* Fix types issue in PickerItemsList
* Refactor toggleAllItemsSelection and availableItems usage
* Remove customLabel prop from PickerSelectionStatusProps
* Add renderTopCustomElement and renderBottomCustomElement props to PickerSelectionStatusToolbar
* Rename getLabel prop to getSelectionStatusLabe and update related usages
* Refactor selectionStatus handling in PickerItemsList
* Remove unnecessary null return in renderLabel
* Remove renderTopCustomElement prop
* Rename _onSegmentChange to onSegmentChange
* Fix TypeScript ignore directive for selectAllType in Picker
* Update buttonProps onPress parameter to use selectionValue and set default selectAllType to 'button'
* Refactor Picker selection logic to use areAllItemsSelected and simplify selection status handling
* Rename getSelectionStatusLabel to getLabel and update type definitions for clarity
* Remove renderBottomCustomElement prop and add divider in PickerSelectionStatusToolbar
* Refactor Picker component to remove PickerSelectAllType enum
* Refactor PickerSelectionStatusToolbar to simplify props and selection handling
* Rename PickerSelectionStatusToolbar to PickerSelectionStatusBar and update related references
* Update buttonProps onPress to use customValue instead of selectionValue in PickerSelectionStatusBar
* Add selectAllType prop to PickerSelectionStatusBar for flexible selection handling
* Refactor PickerSelectionStatusBar to remove selectAllType prop and simplify selection handling
* Fix type assertion for value in PickerSelectionStatusBar to ensure correct handling of PickerMultiValue
* Refactor renderSelectionStatus, fix when showLabel is false
* Add PickerSelectionStatusProps import to PickerScreen and index files
* Remove unused setMultiFinalValue from usePickerSelection hook
* Remove value from PickerSelectionStatusLabelData
* selectedCount moved to usePickerSelection
* PickerSelectionStatusBar simplify selectedCount
---------
Co-authored-by: Miki Leib <38354019+M-i-k-e-l@users.noreply.github.com>1 parent a3464ec commit 999cded
File tree
7 files changed
+219
-31
lines changed- demo/src/screens/componentScreens
- src
- components/picker
- helpers
7 files changed
+219
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
| |||
107 | 119 | | |
108 | 120 | | |
109 | 121 | | |
110 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
111 | 128 | | |
112 | 129 | | |
113 | 130 | | |
| |||
148 | 165 | | |
149 | 166 | | |
150 | 167 | | |
151 | | - | |
| 168 | + | |
152 | 169 | | |
153 | 170 | | |
154 | 171 | | |
| |||
215 | 232 | | |
216 | 233 | | |
217 | 234 | | |
218 | | - | |
219 | | - | |
220 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
221 | 241 | | |
222 | 242 | | |
223 | 243 | | |
| |||
226 | 246 | | |
227 | 247 | | |
228 | 248 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
240 | 253 | | |
241 | 254 | | |
242 | 255 | | |
243 | | - | |
| 256 | + | |
244 | 257 | | |
245 | 258 | | |
246 | 259 | | |
| |||
299 | 312 | | |
300 | 313 | | |
301 | 314 | | |
302 | | - | |
| 315 | + | |
303 | 316 | | |
304 | 317 | | |
305 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
177 | 182 | | |
178 | 183 | | |
| 184 | + | |
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
51 | 68 | | |
52 | 69 | | |
53 | 70 | | |
54 | 71 | | |
55 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
56 | 76 | | |
57 | 77 | | |
58 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
105 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
106 | 116 | | |
107 | 117 | | |
108 | 118 | | |
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
112 | 122 | | |
113 | | - | |
| 123 | + | |
| 124 | + | |
114 | 125 | | |
115 | 126 | | |
116 | 127 | | |
| |||
152 | 163 | | |
153 | 164 | | |
154 | 165 | | |
155 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
156 | 170 | | |
157 | 171 | | |
158 | 172 | | |
| |||
165 | 179 | | |
166 | 180 | | |
167 | 181 | | |
168 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
169 | 186 | | |
170 | 187 | | |
171 | 188 | | |
| |||
247 | 264 | | |
248 | 265 | | |
249 | 266 | | |
| 267 | + | |
250 | 268 | | |
251 | 269 | | |
252 | 270 | | |
| |||
316 | 334 | | |
317 | 335 | | |
318 | 336 | | |
319 | | - | |
| 337 | + | |
| 338 | + | |
320 | 339 | | |
321 | 340 | | |
322 | 341 | | |
0 commit comments