-
Notifications
You must be signed in to change notification settings - Fork 18
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
Added FocusOptions to setFocus function to allow users to pass preventScroll to setFocus #29
Added FocusOptions to setFocus function to allow users to pass preventScroll to setFocus #29
Conversation
…tScroll to setFocus
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
==========================================
- Coverage 82.71% 82.46% -0.26%
==========================================
Files 20 20
Lines 324 325 +1
Branches 70 64 -6
==========================================
Hits 268 268
- Misses 51 52 +1
Partials 5 5
Continue to review full report at Codecov.
|
const focusable = getFocusMerge(topNode, lastNode); | ||
const { focusOptions = undefined } = options || {}; |
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.
const { focusOptions } = options || {};
This gives the following TS error
Initializer provides no value for this binding element and the binding element has no default value.
Hence, did it this way.
Looking good |
yay! Thanks @theKashey let me know when you released the package, I can then raise a PR to react-focus-lock too. |
|
fixes- theKashey/react-focus-lock#162
@theKashey Please have a look at this. Thanks