Our blazing fast Grid component built with pure JavaScript


Post by Webethics »

Need to design color picker with dropdown options in custom UI. Need some guidance on implementation process

Attachments
Screenshot from 2021-05-27 10-13-49.png
Screenshot from 2021-05-27 10-13-49.png (266.15 KiB) Viewed 497 times

Post by mats »

We don't have one as part of our SDK but you can check https://www.bryntum.com/examples/scheduler/eventeditor/ which has a crude version to give some inspiration (not a very hard field to build).

eventColorField : {
    type        : 'combo',
    label       : 'Color',
    name        : 'eventColor',
    editable    : false,
    weight      : 130,
    listItemTpl : item => StringHelper.xss`<div class="color-box b-sch-${item.value}"></div><div>${item.text}</div>`,
    items       : Scheduler.eventColors.map(color => [color, StringHelper.capitalize(color)])
},

I have also opened https://github.com/bryntum/support/issues/2939 to look into adding our own supported picker in the core.


Post Reply