New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TreeView] Test current behavior of active item removal #21720
Conversation
I think I'm waiting for #21695 first. We should simplify this logic even more so that we can't even make mistakes in the reducer (I already did). We only need to track which node is active. Whether it is "focused" is derived from the active node and whether the |
@eps1lon The linked pull requests and issues have been closed, is the effort still relevant? |
7440f3a
to
6a2b3f1
Compare
@@ -32,6 +33,10 @@ describe('<TreeItem />', () => { | |||
})); | |||
|
|||
describe('warnings', () => { | |||
beforeEach(() => { | |||
PropTypes.resetWarningCache(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup of #21695 which added a test that would fail in in watchmode on subsequent runs.
Updated test. Please also read the updated PR description. |
Adds a test for #20204 which was closed in #21695 but no test was added as far as I can tell.
The test is especially interesting since the behavior is novel: Removing the focused item moves focus to another item of the widget. In other widgets we let focus return to
document.body
.