Our pure JavaScript Scheduler component
Hi there
I have a question regarding the resource collapse functionality, regarding to this sample:
https://www.bryntum.com/examples/scheduler/resource-collapsing/
Is there a simple way to show the collapsible icon only if there are is at least one event available?
So in this example the icon would been hidden for "Lee" and "Jong".
Thanks in advance for your help.
Best,
Thomas
Yeah, Sure. To do so, you can use the renderer
function
https://bryntum.com/docs/scheduler/api/Grid/column/Column#config-renderer
{ type : 'resourceCollapse', renderer({ record }) {
if (record.events.length > 0) {
return {
tag : 'i',
class : {
'b-icon' : 1,
'b-icon-expand-resource' : 1,
'b-flip' : record.eventLayout !== 'none'
}
}
}
} }
Good Luck ,
Tasnim
Attachments
Screenshot 2022-10-07 154445.png (75.25 KiB) Viewed 147 times