ember-table
ember-table copied to clipboard
Range selection does not work on first try
Hello!
When using the ranged selection (shift key pressed), on the first try, nothing is selected.
When looking at the code, the culprit is quite obvious:
if (range) {
// Use a set to avoid item duplication
let { _lastSelectedIndex } = tree;
let minIndex = Math.min(_lastSelectedIndex, rowIndex);
let maxIndex = Math.max(_lastSelectedIndex, rowIndex);
Of course, _lastSelectedIndex is undefined therefore Math.min/max is NaN.