Repository navigation
fix(app): close the time picker on an outside click and Escape #3818
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@hyperdx/app': patch | ||
| --- | ||
|
|
||
| fix: close the time picker on a click outside it or on Escape. It stayed open, | ||
| including above the row side panel opened by clicking a search result. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -295,7 +295,11 @@ const TimePickerComponent = ({ | |
| position="bottom-start" | ||
| closeOnEscape | ||
| opened={opened} | ||
| onClose={close} | ||
| // A controlled popover reports outside clicks and Escape (closeOnEscape) | ||
| // only through onChange; onClose fires after `opened` is already false. | ||
| onChange={next => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 P2 — Escape in a nested dropdown (Duration ±, time zone select, date calendar) now closes the whole picker and loses unapplied edits Mantine's Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't fix: I think this is the expected behavior. It matches what clicking outside the picker or the X button does, and all three discard unapplied edits the same way. |
||
| if (!next) close(); | ||
| }} | ||
| zIndex={getDefaultZIndex('popover') + 2} | ||
| > | ||
| <Popover.Target> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.