Our state of the art Gantt chart


Post by pshdevs »

Hi! How are you?
I would like to know if there is a way to disable specific fields from general tab on the task edit pop up (on react) so that they show but are not editable.
Thank you very much!

Post by pmiklashevich »

beforeTaskEditShow is an event on Gantt, that is supposed to be the hook to manipulate the fields before Task editor is shown. But it doesn't work with 'disabled' config because we change it during task loading into the tabs. Need to override loadEvent method. Please see full solution here: viewtopic.php?f=52&t=13745&p=71292&hilit=beforeTaskEditShow+loadRecord#p71292

I've opened 2 feature requests:
1. To be able to provide static fields configuration:
https://github.com/bryntum/support/issues/673
2. To be able to change fields on runtime after record is loaded:
https://github.com/bryntum/support/issues/674

P.S. Instead of making it disabled, you can make it readOnly like this:
const gantt = new Gantt({
    listeners : {
        beforeTaskEditShow : ({ editor }) => {
            editor.widgetMap.percentDoneField.readOnly = true;
        }
    },

Pavlo Miklashevych
Sr. Frontend Developer


Post by pshdevs »

That's awesome! Thank you very much!

Post by pmiklashevich »

Updated reply with readOnly approach, please take a look

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply