LCweb-ita / LC-color-picker

The colorpicker for modern web
https://lcweb.it/lc-color-picker-javascript-plugin
MIT License
11 stars 3 forks source link

Square color not updating when setting input value #2

Closed maxigator closed 2 years ago

maxigator commented 2 years ago

When I set via JavaScript the value of an input with the color picker, the square doesn't change color until I click on it. Is there a way to trigger an update and force this color change ?

LCweb-ita commented 2 years ago

Hello, clearly the tool reacts to user inputs. Therefore you have to trigger a "change" or "input" event on the field to let the field to re-sync

maxigator commented 2 years ago

Okay thank you for your quick answer. I managed to fix my issue