JosephusPaye / Keen-UI

A lightweight Vue.js UI library with a simple API, inspired by Google's Material Design.
https://josephuspaye.github.io/Keen-UI/
MIT License
4.1k stars 438 forks source link

UiCheckbox, UiRadio, UiSelect, UiSwitch: emit normalized value on create only if different from current value #544

Closed kilobyte2007 closed 2 years ago

kilobyte2007 commented 2 years ago

Some components were generating initial emits. It makes sense when the value is normalized, but sometimes it would just resend the initial value which is not really necessary. I have added some checks to prevent that.

Reason for this: For some components we have wrappers and it is really important to have consistency at the library level so that we know that events are only emitted when really needed.

Sorry for the amount of PRs lately. We've been using a branch with all these changes and I think it would be great to have them in the following release! Let me know what you think.