Skip to content

New version of checkbox has issues with multiselect = true + RowSelectionModel.selectActiveRow = true #345

@SatanEnglish

Description

@SatanEnglish

On examples like http://6pac.github.io/SlickGrid/examples/example-checkbox-header-row.html

If you turn on Checkbox multiselect and RowSelecitonModel.selectActiveRow

The new version will not allow multiselect to work.

Old version would allow you to select each row by the check box and have multiple selected.
New version does not

     if (lookup[row] !== _selectedRowsLookup[row]) 
    {
          _grid.invalidateRow(row);
          delete _selectedRowsLookup[row];
    }

The above is deleting the row even tho it is the same row.

The issue seems to be one of the commented out rows below.

     function toggleRowSelection(row) {
            if (_selectedRowsLookup[row]) {
                _grid.setSelectedRows($.grep(_grid.getSelectedRows(), function (n) {
                    return n != row
                }));
            } else {
                _grid.setSelectedRows(_grid.getSelectedRows().concat(row));
            }
+            //_grid.setActiveCell(row, getCheckboxColumnCellIndex());
+            //_grid.focus();
        }

The set and then focus seems to be acting like a double click on the checkbox/row

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions