-
Notifications
You must be signed in to change notification settings - Fork 50.4k
[Flare] Add FocusWithin responder #16152
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
Conversation
Details of bundled changes.Comparing: 424099d...7bfb5bd react-events
Generated by 🚫 dangerJS |
7fcece3 to
0d5ff14
Compare
|
Does it make sense to use focusIn/focusOut for the new responder? Shane about the code duplication too, the Focus module size is quite a bit bigger than before :/ we can come back to that though. |
What do you mean?
It's only 0.2 KB larger gzipped after adding new functionality. |
0d5ff14 to
7e2b716
Compare
devongovett
left a comment
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.
I like this idea. Forcing everything into a single responder proved difficult. Thanks for taking this over btw, and sorry I never came back to the old PR.
| ...(focusWithinVisible && focusWithinVisibleStyles) | ||
| }} | ||
| > | ||
| </Focus> |
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.
Should be </FocusWithin>
FocusWithin is implemented as a separate responder, which keeps both focus responders simple and allows for easier composition of behaviours. Close facebook#15848
7e2b716 to
7bfb5bd
Compare
|
Hm. This is the exact use case that I was thinking about for the Focal hooks. What's the use case for this that the useListener hooks wouldn't be sufficient for? |
|
In the current design? How are you expecting |
FocusWithin is implemented as a separate responder, which keeps both focus
responders simple and allows for easier composition of behaviours.
Demo https://codesandbox.io/s/focuswithin-byl1q
Close #15848