<div class = "form-group">
<label for="editbox-bgcolor"> Background color </label>
<input class = "colorpicker" [cpCancelButton] = "true" name = "editbox-bgcolor" [(colorPicker)]="selectedBox.bgColor" [style.background]="selectedBox.bgColor" [value] = "selectedBox.bgColor"/>
</div>
When first time I opened color picker, all thing was fine.
I move cursor and chose other value, then I closed the picker.
Then "selectedBox.bgColor" was updated. It updated due to the change of my model (I chose another box which have other bgColor). Then
In this time the [style.background] and [value] was updated correctly.
But when I open the color picker panel, the initialized cursor still pointed to the last value that i set to the last box before, it was not update to my new "selectedBox.bgColor" when i opened it.
How can I reinit this value cursor when my model change?
I have two input like this:
When first time I opened color picker, all thing was fine. I move cursor and chose other value, then I closed the picker. Then "selectedBox.bgColor" was updated. It updated due to the change of my model (I chose another box which have other bgColor). Then In this time the [style.background] and [value] was updated correctly. But when I open the color picker panel, the initialized cursor still pointed to the last value that i set to the last box before, it was not update to my new "selectedBox.bgColor" when i opened it.
How can I reinit this value cursor when my model change?
Thanks!!