I am facing an issue in using checkbox selector plugin for the Slick grid.
The plugin does not provide any way to add group level checkbox after using grouping plugin for the slick grid. I added checkbox using formatter function in groupItemMetadataProvider options something like this:
dataView.setGrouping({
getter: "duration",
formatter: function (g) {
var checkedState="";
if(g.hasOwnProperty("checked")){
g["checked"] ? checkedState="checked" : checkedState="";
}
return "<input type=\"checkbox\" class="groupCheck" data-id=\""+g.value+"\" "+checkedState+"> Duration: " + g.value + " <span style='color:green'>(" + g.count + " items)</span>";
} });
Above code is displaying a checkbox.
I am binding change event and looping through data view to check rows which have the same duration as groupedBy ID and if its matched saving passing index to toggleRowSelection function in checkbox selector plugin.
Its working fine. Showing all child checked but header checkbox is not saving its state. After scrolling checkbox losing its 'checked' state.
Need help in solving this. Tried saving its state in "isChecekd" flag in above snippet.