Commit 4a37eb8
authored
feat: (React Aria) Implement filtering on a per CollectionNode basis (#8641)
* account for loaders in base collection filter
* rough implementation for listbox
* replace other instances of createLeaf/createBranch to use node classes
* fix bugs with subdialog filtering, arrow nav, dividers, etc
* fix case where arrow nav wasnt working post filter
* update types and class node structure
* prep stories
* fix
* add autocomplete gridlist filtering
* taglist filter support
* fixing lint
* fix tag group keyboard nav and lint
* adding support for table filtering
* fix tableCollection filter so it doesnt need to call filterChildren directly
* create common use nodes for specific filtering patterns
* fix ssr
* refactor to accept a node rather than a string in the filter function
* fix lint
* make node param in autocomplete non breaking
* adding tests, make sure we only apply autocomplete attributes if the wrapped collection is filterable
* prevent breaking change in CollectionBuilder by still accepting string for CollectionNodeClass
* fix tests and pass submenutrigger node to filterFn
* small clean up
* small fixes
* addressing more review comments
* simplifying setProps logic since we have already have id when calling it
* forgot to use generic for autocomplete filter
* ugh docs typescript
* review comments
* add example testing the Autocomplete generic
* fix: Autocomplete context refactor (#8695)
* autoimport....
* replace internal autocomplete context
* add FieldInputContext in place of input context and search/textfield context in autocomplete
* fix build
* removing erroneous autoimports
* add ability for user to provide independent filter text
* fix lint
* fix some more tests
* bring back controlled input value at autocomplete level
* adding prop to disable virtual focus
* another stab at the types
* clear autocomplete contexts so that they dont leak to nested collections
* add tests for disallowVirtualFocus works with listbox and menu
* fix types
* refactor CollectionNode to read from static property and properly clone from subclass
* naming from reviews and moving contexts out of autocomplete
* review comments
* properly add all descendants of a cloned node when filtering
fixes case where a filtered table keyboard navigation was broken since we had cloned the old collection rather than creating a new one from scratch
* support filtering when there are sections in gridlist
* fix mobile screen reader detection for disabling virtual focus
fixes case where opening a nested autocomplete subdialog in a autocomplete menu via ENTER didnt allow the user to navigate the subdialogs options via keyboard
* review comments1 parent f821086 commit 4a37eb8
File tree
40 files changed
+1505
-607
lines changed- packages
- @react-aria
- autocomplete/src
- collections
- src
- test
- @react-spectrum/s2/src
- @react-stately
- list/src
- table/src
- dev/s2-docs/src
- react-aria-components
- docs
- src
- stories
- test
- react-stately/src
40 files changed
+1505
-607
lines changedLines changed: 65 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | | - | |
| 46 | + | |
39 | 47 | | |
40 | 48 | | |
41 | | - | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | | - | |
| 52 | + | |
45 | 53 | | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
51 | | - | |
| 59 | + | |
52 | 60 | | |
53 | | - | |
| 61 | + | |
54 | 62 | | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
59 | | - | |
| 67 | + | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
| |||
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
68 | | - | |
| 76 | + | |
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
73 | | - | |
| 81 | + | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | | - | |
| 85 | + | |
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
83 | 92 | | |
84 | | - | |
85 | | - | |
| 93 | + | |
| 94 | + | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
| |||
252 | 261 | | |
253 | 262 | | |
254 | 263 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
264 | 275 | | |
265 | 276 | | |
266 | 277 | | |
| |||
280 | 291 | | |
281 | 292 | | |
282 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
283 | 297 | | |
284 | 298 | | |
285 | 299 | | |
| |||
316 | 330 | | |
317 | 331 | | |
318 | 332 | | |
319 | | - | |
| 333 | + | |
320 | 334 | | |
321 | | - | |
| 335 | + | |
322 | 336 | | |
323 | 337 | | |
324 | 338 | | |
| |||
352 | 366 | | |
353 | 367 | | |
354 | 368 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
362 | 388 | | |
363 | 389 | | |
364 | 390 | | |
365 | | - | |
366 | 391 | | |
367 | 392 | | |
368 | 393 | | |
369 | 394 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
374 | 401 | | |
375 | 402 | | |
376 | 403 | | |
| |||
0 commit comments