-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(datepicker): esc can close datepicker #3966
feat(datepicker): esc can close datepicker #3966
Conversation
Codecov Report
@@ Coverage Diff @@
## development #3966 +/- ##
===============================================
- Coverage 74.86% 74.83% -0.03%
===============================================
Files 276 276
Lines 8399 8422 +23
Branches 1596 1601 +5
===============================================
+ Hits 6288 6303 +15
- Misses 1668 1673 +5
- Partials 443 446 +3
Continue to review full report at Codecov.
|
Addresses #3890 |
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.
Hey, thanks for PR!
I think we could merge close on ESC
but not sure about tab related logic
if you could split this PR into 2 (one with ESC one with Tab, logic) it would be easier to merge
@@ -298,6 +301,16 @@ export class ComponentLoader<T> { | |||
}); | |||
}); | |||
} | |||
if (this._listenOpts.outsideEsc) { | |||
const target = this._componentRef.location.nativeElement; | |||
setTimeout(() => { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
6a9bf95
to
c00b348
Compare
'tab can close datepicker' functionality was cut out as unnecessary for now |
Smoke tested in Chrome, FF -Esc always close the Datepicker. Looks good. |
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.
LGTM, thanks ;)
Fixes valor-software#3890 * tab can close datpicker, esc can exit datpicker * fix(datepicker): conflicts resolve & leave only esc datepicker close * feat(datepicker): add test
Closes #3890
PR Checklist
Before creating new PR, please take a look at checklist below to make sure that you've done everything that needs to be done before we can merge it.