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
Wire up a datepicker and a submit button. The submit button should have a disabled field. When the datepicker has an error, the submit button isn't disabled until I click out of the datepicker; even though the datepicker itself shows an error.
Expected behavior
Expected behavior should be as soon as an error happens, I should be allowed to update the state of whatever I want, not have to wait for an onBlur event or the focus to change.
Actual behavior
When I input an invalid character, I get an immediate error from the datepicker, but I can't piggyback off that to update the state of a button. I've tried using onError on the component, but I cannot update the state of my button to disabled until after the focus is moved from the datepicker.
Live example
The text was updated successfully, but these errors were encountered:
@dmtrKovalenko I don't think that the issue is related to the popup. Looking at the screenshot, the problem seems to be that the UI only takes the error into account on the blur event, not the key event. This lead to an inconsistency in the UI.
No issue. This lead me to believe that the root issue is in @tgaeta's codebase or in v2. I think that it's a good example that we should be aggressively closing issues that don't provide reproduction or using an older version of the library (below v4). Unless we can quickly see what could go wrong.
oliviertassinari
changed the title
Can't update state of other components until focus is removed from the datePicker.
Validation display at keydown but give feedback at blur
Apr 13, 2020
Environment
Steps to reproduce
Wire up a datepicker and a submit button. The submit button should have a disabled field. When the datepicker has an error, the submit button isn't disabled until I click out of the datepicker; even though the datepicker itself shows an error.
Expected behavior
Expected behavior should be as soon as an error happens, I should be allowed to update the state of whatever I want, not have to wait for an onBlur event or the focus to change.
Actual behavior
When I input an invalid character, I get an immediate error from the datepicker, but I can't piggyback off that to update the state of a button. I've tried using
onError
on the component, but I cannot update the state of my button to disabled until after the focus is moved from the datepicker.Live example
The text was updated successfully, but these errors were encountered: