Skip to content

Commit

Permalink
#6297 selection.table.CellColumnRowModel
Browse files Browse the repository at this point in the history
tobiu committed Jan 26, 2025
1 parent 6c4f937 commit 1f79e54
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/selection/table/CellColumnRowModel.mjs
Original file line number Diff line number Diff line change
@@ -63,14 +63,14 @@ class CellColumnRowModel extends CellRowModel {
* @param {Object} data
*/
onCellClick(data) {
let me = this,
id = data.data.currentTarget,
columnNodeIds, index, tbodyNode;
let me = this,
{headerToolbar} = me.view.parent,
id = data.data.currentTarget,
columnNodeIds, index;

if (id) {
index = ColumnModel.getColumnIndex(id, me.view.items[0].items);
tbodyNode = VDomUtil.find(me.view.vdom, {tag: 'tbody'}).vdom;
columnNodeIds = VDomUtil.getColumnNodesIds(tbodyNode, index);
index = ColumnModel.getColumnIndex(id, headerToolbar.items);
columnNodeIds = VDomUtil.getColumnNodesIds(me.view.vdom, index);

me.deselectAllCells(true);
me.select(columnNodeIds, me.selectedColumnCellIds, me.selectedColumnCellCls)
@@ -88,7 +88,7 @@ class CellColumnRowModel extends CellRowModel {
idArray = ColumnModel.getCellId(data.path).split('__'),
currentColumn = idArray[2],
{view} = me,
dataFields = view.columns.map(c => c.dataField),
dataFields = view.parent.columns.map(c => c.dataField),
newIndex = (dataFields.indexOf(currentColumn) + step) % dataFields.length,
columnNodeIds, tbodyNode;

0 comments on commit 1f79e54

Please sign in to comment.