Commit a32c05e
TableView and ListView skip focusing when empty, but have a focusable child (#3581)
* TableView doesn't get focus when empty, but there is a link
* Refactor plus getting to work with ListView and Virtualizer components
* some small improvments and lint type fixes
* making lint and test pass for a WIP build
* reverting skipped tests
* refactored useTabbableChildre to not use a MutationObserver
* Factoring in empty collection to new Virtualizer tabIndex logic
* improving fragile test and making sure a hook is always called
* moving hook to fix circular dependancy and adding listview test
* refactored new hook to use hooks useState and useEffect
* refactoring hook to return boolean for tabbable child existence instead of setting tabIndex
* removing code that didn't fix a test
* fixing lint warning useEffect dependencies
Co-authored-by: Robert Snow <rsnow@adobe.com>1 parent fc97a5d commit a32c05e
File tree
6 files changed
+68
-10
lines changed- packages
- @react-aria/virtualizer
- src
- @react-spectrum
- list/test
- table
- src
- test
6 files changed
+68
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
181 | 187 | | |
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
185 | 191 | | |
186 | 192 | | |
187 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
188 | 197 | | |
189 | 198 | | |
190 | 199 | | |
| |||
Lines changed: 39 additions & 0 deletions
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
555 | 562 | | |
556 | 563 | | |
557 | 564 | | |
| |||
575 | 582 | | |
576 | 583 | | |
577 | 584 | | |
578 | | - | |
579 | | - | |
580 | | - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
581 | 593 | | |
| 594 | + | |
582 | 595 | | |
583 | | - | |
| 596 | + | |
584 | 597 | | |
585 | 598 | | |
586 | 599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
472 | | - | |
| 471 | + | |
473 | 472 | | |
474 | 473 | | |
475 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4226 | 4226 | | |
4227 | 4227 | | |
4228 | 4228 | | |
4229 | | - | |
4230 | 4229 | | |
4231 | 4230 | | |
4232 | 4231 | | |
4233 | 4232 | | |
4234 | 4233 | | |
4235 | 4234 | | |
4236 | | - | |
4237 | | - | |
4238 | 4235 | | |
4239 | 4236 | | |
4240 | 4237 | | |
| |||
0 commit comments