Page 1 of 1

INFO - Gantt is there any event to track if state changes

Posted: Fri May 26, 2023 3:29 pm
by shaveta

Hi,

For data-related changes State Tracking Manager(STM) is used in Gantt, is there something similar to figure out any view-related changes? So the use case is if the user changes the width of the column or makes changes in view that are not related to data can we track it?

Thanks!!


Re: INFO - Gantt is there any event to track if state changes

Posted: Fri May 26, 2023 3:37 pm
by tasnim

Hi,

There is a columnStore available, So you could listen to the change event of it to observe the changes
https://bryntum.com/products/gantt/docs/api/Grid/data/ColumnStore#event-change

Here is an example

gantt.columns.on('change', (props) => {
    if (props.action === 'update') {
        if (props.changes.width) {
            console.log(props.changes);
        }
    }
})