You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiSuperDatePicker] Error occurs when changing absolute date #3746
changed the title [-][Date Filter] Error occurs when changing absolute date[/-][+][Timepicker] Error occurs when changing absolute date[/+]on Jul 15, 2020
Can't reproduce this in EUI, but have been told it is flakey and doesn't always error. @elastic/kibana-app-arch team, please investigate. If you do find it's an issue in EuiSuperDatePicker, please move this issue to EUI.
(a) This is an EUI bug. I suspect that when you edit the absolute date manually, for a brief moment you have an invalid date and then the function data.format fails.
(b) I also noticed that when I switch to an absolute date, my CPU usage would jump and if my debugger is open, it would often get stuck. Tried this multiple times. Same result. I would check how often the field is being validated (debounce or even validate on blur)
The steps I took to reproduce were
Open discover
Change the date to absolute
Pick a date and a time
Edit the string field in the bottom
Doing that, I got both a React error and the can't call method format of undefined (that can be seen in the gif).
When I opened the debugger and put a conditional break-point in the function formatDate (date == undefined), and repeated the same action, the browser would just hang. I repeated the same flow 3 or 4 time with similar results.
This makes me suspect that the field is being validated very often and that adding a conditional break-point to it made it slower (but I'm obviously not sure).
changed the title [-][Timepicker] Error occurs when changing absolute date[/-][+][EuiSuperDatePicker] Error occurs when changing absolute date[/+]on Jul 15, 2020
Activity
elasticmachine commentedon Jul 15, 2020
Pinging @elastic/siem (Team:SIEM)
[-][SIEM] Datepicker bug when changing date[/-][+][EUI] Datepicker bug when changing date[/+][-][EUI] Datepicker bug when changing date[/-][+][Date Filter] Error occurs when changing absolute date[/+][-][Date Filter] Error occurs when changing absolute date[/-][+][Timepicker] Error occurs when changing absolute date[/+]cchaos commentedon Jul 15, 2020
Can't reproduce this in EUI, but have been told it is flakey and doesn't always error. @elastic/kibana-app-arch team, please investigate. If you do find it's an issue in EuiSuperDatePicker, please move this issue to EUI.
lizozom commentedon Jul 15, 2020
(a) This is an EUI bug. I suspect that when you edit the absolute date manually, for a brief moment you have an invalid date and then the function
data.formatfails.(b) I also noticed that when I switch to an absolute date, my CPU usage would jump and if my debugger is open, it would often get stuck. Tried this multiple times. Same result. I would check how often the field is being validated (debounce or even validate on blur)
The steps I took to reproduce were
Doing that, I got both a React error and the
can't call method format of undefined(that can be seen in the gif).When I opened the debugger and put a conditional break-point in the function
formatDate(date == undefined), and repeated the same action, the browser would just hang. I repeated the same flow 3 or 4 time with similar results.This makes me suspect that the field is being validated very often and that adding a conditional break-point to it made it slower (but I'm obviously not sure).
[-][Timepicker] Error occurs when changing absolute date[/-][+][EuiSuperDatePicker] Error occurs when changing absolute date[/+]thompsongl commentedon Jul 15, 2020
I was able to reproduce with a simple EUI case. Investigating further.
thompsongl commentedon Jul 15, 2020
I've tracked down the problem, but am running into some unrelated build side effects from the packaged library. I'll sort it out before opening a PR.