I have found out some issues regarding disableVisualSelection for some rows only.
My goal was to disable selection of the first row for the user (which act as a header but that is not important I think)
var hot = new Handsontable(container, {
data: data(),
minSpareCols: 1,
minSpareRows: 1,
rowHeaders: true,
colHeaders: true,
contextMenu: true,
cells:(row, column)=>{
if(row==0){
return {
disableVisualSelection: true,
}
}
return {};
}
});
Issues:
-
Right click on any > 0 row on -1 column works as intended BUT if you right click -1,-1 (the very corner) whole table will be logically selected but selection is not shown. Therefore right clicking on any other of rows will not select those rows but rather display context menu for whole table.
I assume that whole table is selected because it is shown like this if I reenable visual selection. I have to left click somewhere to make it work again - it is very confusing for the users (and was even for me) especially if context menu content is based on row selection (my real case) -
I cannot left/right click select the first row as intended, BUT I can actually click any row > 1 and shift click row 0 to select it which should be forbidden