Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Setting a field to empty doesn't emit change event #244

Open
OmgImAlexis opened this issue Jul 9, 2021 · 3 comments
Open

Setting a field to empty doesn't emit change event #244

OmgImAlexis opened this issue Jul 9, 2021 · 3 comments

Comments

@OmgImAlexis
Copy link

Describe the bug
When a user types into an input box it emits a "change" event. If the field is set to "" the change event isn't fired.

To Reproduce

  1. Create project with @next branch.
  2. Fill a field with text
  3. Empty field
  4. See the field is still showing the previous string

Expected behavior
The field to be cleared and the change event to be fired.

Additional context
The sandbox doesn't have this issue and I believe that's because it's still using the vue 2 version.

@OmgImAlexis OmgImAlexis changed the title Setting a field to empty doesn't call onChange Setting a field to empty doesn't emit change event Jul 9, 2021
@OmgImAlexis
Copy link
Author

The hasValue(curr) check needs to be removed.

@nkanetka
Copy link

nkanetka commented Oct 21, 2021

It looks like there are 3 places that need the check removed:

I'm curious if this is a desired change that could be implemented? I'm happy to implement it, however it looks like there are unit tests checking that this functionality "works" and I don't have the context on why it was implemented this way in the first place.

Maybe @alvarosaburido can comment?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants