Thank you for contacting us. We don’t have an API to check that, as it’s a custom implementation, but it should be possible to do with just checking the state of the input element inside the row header. Can you specify what do you mean by getting those rows? Getting their indexes, or the data?
I tried this and i can get what i wanted : code based on the demo, file :src/data-grid/utils/hooks-callbacks.ts
export const changeCheckboxCell: ChangeCheckboxCell = function changeCheckboxCell(
event,
coords
) {
const target = event.target as HTMLInputElement;
if (coords.col === -1 && event.target && target.nodeName === "INPUT") {
event.preventDefault(); // Handsontable will render checked/unchecked checkbox by it own.
// HERE : we can intercepte which row just be selected/unselected
console.debug(this.getDataAtRow(coords.row));
this.setDataAtRowProp(coords.row, "0", !target.checked);
}
};
With a little rework I will be able to store data on a service.
I’m open to a better solution if you have one; otherwise, we can close the topic.