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
782 stars 29 forks source link

Alternate event to `color-changed` #104

Open binaryfire opened 7 months ago

binaryfire commented 7 months ago

Hi guys. Thanks for the great package.

When using JS components in Laravel Livewire, every event triggers a server request. So using color-changed can be quite brutal on the server because a request is fired for every pixel moved when users are dragging the selector.

Would it be possible to add an additional event which fires only when dragging is complete? That would allow us to send a single request after a user has stopped moving the selector.

au5ton commented 5 months ago

If we're staying true to HTML, color-changed should be an input event and when the drag completes it should be a change event.