I have a color palette declared on my form:
<kendo-colorpalette
#riskAssessmentColourCode
[palette]=
"palette"
(valueChange)=
"riskAssessmentColourCodeChange($event)"
formControlName=
"riskAssessmentColourCode"
[tileSize]=
"30"
>
</kendo-colorpalette>
I declare a handle for the color palette in my component:
@ViewChild(
'riskAssessmentColourCode'
) public riskAssessmentColourCode: ColorPaletteComponent;
I try to get a handle on this to set the initial value:
this
.riskAssessmentColourCode.value =
this
.palette[
this
.lastHistory.riskAssessment.riskAssessmentColourCode];
But the component is undefined and I am unable to set the value.
I can change the form control value with:
this
.ncDocumentEditForm.controls[
'riskAssessmentColourCode'
].setValue(
this
.lastHistory.riskAssessment.riskAssessmentColourCode);
But the visible component does not set in the same way as if I select it with a mouse (i.e. the selected block is not highlighted).
The design of this forum really is a joke with popup windows appearing below headers and the user unable to exit a code block if s/he hasn't inserted a line break to jump to first. It's a very poor user experience and, if it were advertising your components as a window no-one would select your product. Please sort it out.
How do I set the color palette value?