huebee
huebee copied to clipboard
Update value even if color is not correct
Greetings,
I have an issue, I noticed that the color change function fires up only when the color is valid.
Is there a way to fire it up even if the inputted data is not a valid color?
For example, in the console.log(this.selectedColor), it only fires when the color is valid. Let's say I add #xxx87, it doesn't fire up. Is it possible to make it available even when the data is not a valid color?
if (!this.colorSelector) {
const elem = this.$el.querySelector('.brand-color-input')
this.colorSelector = new Huebee(elem,{
notation: 'hex',
saturations: 2,
})
this.colorSelector.on('change', (color) => {
this.selectedColor = color
this.colorIcon = elem.style.color
this.$emit('input', this.selectedColor)
console.log(this.selectedColor)
})
}