I'm trying reproduce the onToggle function used here: https://bryntum.com/examples/gantt/indicators/ on a list widget like so:
{
ref : 'indicators',
type : 'list',
cls : 'indicator-list',
panelHeader : {
title : 'Indicators',
cls : 'indicator-header-title'
},
itemTpl : item => `<input type="checkbox"></input><span class="ms-2">${item.text}</span>`,
items : [
{ ref : 'headerAnnotations', text : 'Header Annotations', checked : true, },
{ ref : 'deadlineDate', text : 'Deadlines', checked : true },
{ ref : 'constraintDate', text : 'Logic Constraints', checked : true },
{ ref : 'earlyDates', text : 'Early Starts/Finishes', checked : true },
{ ref : 'lateDates', text : 'Late Starts/Finishes', checked : true },
],
onItem({ref, record, index, item, checked}) {
console.log("list record ", item.ref)
console.log( this.parent.parent.gantt.features.indicators.items[record.ref] )
this.parent.parent.gantt.features.indicators.items[record.ref] = checked;
}
},
But when I check/uncheck a checkbox it only hides the indicator, and will not show it again - is there another method her for toggling list items on the gantt that you could recommend?