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
54 stars 6 forks source link

[TypeScript] Event tool tip type should accept tools config #9884

Closed ghulamghousdev closed 2 months ago

ghulamghousdev commented 2 months ago

Forum post

When I add tools to the config it tells me it's not included in EventTooltipConfig. While the docs tell a different story. I'll put the config below so you can reproduce it:

const eventTooltipConfig: Partial<EventTooltipConfig> = {
            tooltip:{
               tools:{
                edit : {
                    handler : () => console.log(`Handle editing our way`)
                },
                // Add a new tool for our own operation
                newTool : {
                    cls     : 'b-icon-add',
                    tooltip : 'Test',
                    handler() {
                        console.log(`Test`);
                    }
                }
            },
            renderer({eventRecord}) {
                console.log(eventRecord)
                return {
                    text: `From`
                }
            },
            titleRenderer(eventRecord) {
                return {
                    text: `${eventRecord.name} ${eventRecord.resource.name}`,
                };
            }
        }
    }