Closed DerrikMilligan closed 1 year ago
Hi @DerrikMilligan, thank you for this PR and good explanation on the issue with reproduction link. Very helpful 👍
Indeed the isFocused
was missing in the code, but I also took the opportunity to fix a couple of other things as you will see in my commit.
I preferred to fix the issue at the source rather than using a couple of $nextTick, but that's teamwork. :)
Currently the
w-select
component fails to re-validate when used in aw-form
that hasno-keyup-validation
enabled and is relying on blur validation. Selecting a different item from the dropdown doesn't trigger a re-validation.Here is a codepen with a minimal re-production of how it currently works.
Steps:
Validate
buttonw-select
I noticed that the
w-select
component is not passing theisFocused
down to thew-form-element
when inside aw-form
component.And added a couple
$nextTick
callbacks to toggle theisFocused
state when the menu closes to trigger a blur type validation even though it gets focused shortly after.