Page 1 of 1

[REACT] Gantt Edit Popup Styling

Posted: Tue Mar 21, 2023 7:54 am
by harshalkhode1703

Hi,

Can I change color appearing in edit popup.

I have different color for each task i want it to take task color

related image

Screenshot from 2023-03-21 11-22-31.png
Screenshot from 2023-03-21 11-22-31.png (5.15 KiB) Viewed 147 times

Re: [REACT] Gantt Edit Popup Styling

Posted: Tue Mar 21, 2023 1:09 pm
by tasnim

Hi,

You could use https://bryntum.com/products/gantt/docs/api/Gantt/feature/TaskEdit#event-beforeTaskEdit and add style to the tbar
Here is an example

        beforeTaskEdit (event) {
            console.log(event);
            const { taskElement, taskEdit : { editor } } = event;
            const color = getComputedStyle(taskElement).backgroundColor;
            editor.headerElement.style.backgroundColor = color;
        }