This is a migrated thread and some comments may be shown as answers.

ColorPicker

5 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Flemming
Top achievements
Rank 2
Flemming asked on 11 Mar 2019, 12:14 PM

Hi,

Are there any plans for adding a colorpicker to Kendo UI for Angular?

And for now, what is your recommendation for an alternative? 

 

Best regards

Flemming Christiansen

5 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 12 Mar 2019, 08:10 AM
Hi Flemming,


Yes, the ColorPicker component is planned for our next official release. Hopefully we will publish the first beta version, containing "Palette" pickers in the next week or two.

Regards,
Dimiter Madjarov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Flemming
Top achievements
Rank 2
answered on 12 Mar 2019, 08:15 AM

Awesome!

 

Any chance to get my hands on the beta?

 

/Flemming

0
Dimiter Madjarov
Telerik team
answered on 12 Mar 2019, 10:47 AM
Hello Flemming,


Yes, the ColorPicker will be first released as a "Development Build", which could be obtained as described on the following documentation page

https://www.telerik.com/kendo-angular-ui/components/installation/development-builds/

Regards,
Dimiter Madjarov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Kristiyan
Top achievements
Rank 1
answered on 27 May 2019, 01:51 PM

Hi Telerik team, 

I've found a very subtle bug in the color picker. Please refer to: https://stackblitz.com/edit/angular-axhbly 

Try activating row 42,43 or 44 respectively, in order to reproduce bug in the 42 variant. 

And please create a dedicated forum for this component.

Cheers, Kristiyan

0
Dimitar
Telerik team
answered on 28 May 2019, 08:50 AM
Hello Kristiyan,

Thank you for the shared example. The experienced issue is due to using a property getter to generate the PaletteSettings object. On every change detection cycle a new object is created. It works fine with lines 43 and 44 as the latter two point either to a string (which remains the same) or to the same array instance. With line 42 a new array instance is created on each change detection cycle, which causes the inner ColorPalette to be redrawn. That on the other hand leads to the described undesired behavior. When clicking on a tile in the open palette, a new change detection cycle is triggered, the palette is redrawn and all the tile click event listeners are disposed before the color selection is handled.

Generally speaking, binding input properties to getters or functions which generate objects or arrays is not advisable in Angular as it causes DOM re-rendering in cases when the data has not actually been changed. This is why, the ColorPicker is not designed to work this way. Refer to this working example which uses a static PaletteSettings object.

If the color settings on certain interaction events have to be changed, then this could be done in the component life-cycle hooks or in the corresponding event handlers, rather than providing functions that yield a different result on each change detection cycle. Another option is to react to certain ColorPicker component events.

Make sure to write back if I'm missing something!

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Flemming
Top achievements
Rank 2
Answers by
Dimiter Madjarov
Telerik team
Flemming
Top achievements
Rank 2
Kristiyan
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or