Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Removed change and keydown events from input listeners #768

Merged
merged 1 commit into from
May 26, 2020

Conversation

LukasHirt
Copy link
Contributor

@LukasHirt LukasHirt commented May 25, 2020

Since they are passed via listeners there is no need for them.

@LukasHirt LukasHirt self-assigned this May 25, 2020
@LukasHirt LukasHirt marked this pull request as ready for review May 25, 2020 08:15
@kulmann
Copy link
Member

kulmann commented May 25, 2020

The change event actually exists for listening to changes, so I don't agree with removing it. There might be use cases for listening to all changes, not only submitted changes.

As we are passing all incoming listeners on our component through to the input component, we could get rid of all our custom event listeners. Thoughts?

@LukasHirt
Copy link
Contributor Author

LukasHirt commented May 25, 2020

As we are passing all incoming listeners on our component through to the input component, we could get rid of all our custom event listeners. Thoughts?

That would make sense. I'm just thinking now if we should keep the change custom event and just rename it (just to make it a tiny bit easier for using) or also remove it and leave it to the place where it's used to handle the enter via keydown event. @kulmann

@kulmann
Copy link
Member

kulmann commented May 25, 2020

That would make sense. I'm just thinking now if we should keep the change custom event and just rename it (just to make it a tiny bit easier for using) or also remove it and leave it to the place where it's used to handle the enter via keydown event. @kulmann

I think using @keydown.enter=... already is fairly easy to use as a developer. I would remove the custom emitted change event entirely. One thing that might make sense is forcing the focus.

@LukasHirt LukasHirt changed the title Delete change event from input listeners Removed change and keydown events from input listeners May 25, 2020
@LukasHirt
Copy link
Contributor Author

@kulmann I left there still focus and input events. focus additionally handles selecting of the input value and without input the v-model would be returning event instead of the value.

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@LukasHirt LukasHirt merged commit 3d9f01a into master May 26, 2020
@LukasHirt LukasHirt deleted the bugfix/input-change-event branch May 26, 2020 08:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants