jaames/iro.js

Update the border color on input?

Newbrict opened this issue · 2 comments

Hi, I wanted to have the border color update to the selected color. I tried this:

color_picker.on('color:change', (color) => {
  color_picker.borderColor = color.hexString;
});

But the border does not get redrawn. Is this possible with iro currently?
Thanks.

i think i forgot to document it but there is a setOptions method that can update props after the color picker has been created. color_picker.setOptions({borderColor: color.hexString}); should do it.

i think i forgot to document it but there is a setOptions method that can update props after the color picker has been created. color_picker.setOptions({borderColor: color.hexString}); should do it.

That works, thank you.