How to change text in active area.
3 years ago.
onBeforeRowHeaderColumnRender: function (args) {
let self = this
isExpaned = true;
if (args.column.data.name === "Group") {
args.column.areas = [{
width: 34,
height: 34,
left: 50,
top: 5,
style:"cursor:pointer",
text: '-',
//symbol: "/includes/images/rebranding_2020/icons/dots.svg#minichevron-down-4",
onClick: function(arg) {
if (isExpaned) {
self.rows.collapseAll()
arg.source.text("+");
isExpaned = false;
return;
}
arg.source.text("-");
self.rows.expandAll();
isExpaned = true
}
}]
}
//console.log(args.column.areas )
},
The above collapse and expands the rows when column[0] is clicked. However I would like to show the state of area on next click. All works except for changing the text content of the div. I have tried using arg.area.text and the originalEvent to api. I thought arg.source within the click access to the Event api. Any help?
DayPilot