web-padawan / vanilla-colorful

A tiny color picker custom element for modern web apps (2.7 KB) 🎨
https://web-padawan.github.io/vanilla-colorful/
MIT License
784 stars 29 forks source link

Updating picker color without dispatching a color-changed event #64

Closed lpellegr closed 2 years ago

lpellegr commented 3 years ago

It seems there is no public method to update a picker color without triggering a color-changed event.

Looking at the implementation, there is a private update method: https://github.com/web-padawan/vanilla-colorful/blob/master/src/lib/components/color-picker.ts#L103

For people implementing their own input-color element, such a method would be really convenient, or simply an optional argument to the existing color setter to specify whether an event must be dispatched.