bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
53 stars 6 forks source link

`columnCollapseToggle` event is missing in type `BryntumSchedulerProProps.listeners` #9724

Open ghulamghousdev opened 1 month ago

ghulamghousdev commented 1 month ago

Forum post

Please try to add the onColumnCollapseToggle event using the app and you can see it is never triggered.

inline-data 2.zip

canonic-epicure commented 1 month ago

Specifying listener in the listeners property:

export const schedulerProProps : BryntumSchedulerProProps = {
    ...
    listeners : {
        // @ts-ignore
        columnCollapseToggle(event : any) : void { ... }
    }
}

seems to work as intended, just need to translate listeners config to the html template:

<bryntum-scheduler-pro
    ...
    [listeners]="schedulerProProps.listeners!"
></bryntum-scheduler-pro>

Note, that specifying onColumnCollapseToggle in the AppComponent:

export class AppComponent implements AfterViewInit {
    onColumnCollapseToggle(event : any) : void {
        ...
    }
}

isn't supposed to work, since the AppComponent is not anyhow related to Bryntum Events mixin.

However, it seems that columnCollapseToggle event is missing in the types - that probably should be fixed. I've updated the ticket title accordingly.