Posted 5 February 2018, 9:58 pm EST
I’m currently using
selectionMode: CellRange
and I noticed that when you turn on ```showMarquee: true
All the other cells in a selection receive the "wj-state-multi-selected" class, apart from the [b]active[/b] one too.
Even on single click or keyboard navigation, the active cell never gets given the "wj-state-selected" class. I presume this is a bug because, if you use ```
showMarquee: false
``` the class is added.
Right now I can work around this with the following handler, but wanted to know if its indeed a bug or if there is some other setting I'm overlooking:
grid.updatedView.addHandler(function(grid, args){
// Get Positions
var source = { row: grid.selection.row2, column: grid.selection.col2 }
var destination = { row: grid.selection.row, column: grid.selection.col }
// Get First & Last Cell Element
var first = grid.cells.getCellElement(source.row || 0, source.column || 0);
var last = grid.cells.getCellElement(destination.row || 0, destination.column || 0);
// Attach Classes
if (last !== null) last.classList.add(“wj-state-selected”, “wj-state-multi-selected”);
})