find column fixed

This commit is contained in:
Jan Prochazka
2021-10-13 18:08:54 +02:00
parent 6a41c780f4
commit 4ee66a55c6

View File

@@ -484,7 +484,11 @@
export function hideColumn() { export function hideColumn() {
const columnIndexes = _.uniq(selectedCells.map(x => x[1])); const columnIndexes = _.uniq(selectedCells.map(x => x[1]));
for (const index of columnIndexes) { for (const index of columnIndexes) {
display.setColumnVisibility(visibleRealColumns[index].uniquePath, false); const name = realColumnUniqueNames[index];
const column = display.allColumns.find(x => x.uniqueName == name);
if (column) {
display.setColumnVisibility(column.uniquePath, false);
}
} }
// selectedCells = [currentCell]; // selectedCells = [currentCell];
} }
@@ -1050,6 +1054,8 @@
{ command: 'dataGrid.setNull' }, { command: 'dataGrid.setNull' },
{ placeTag: 'edit' }, { placeTag: 'edit' },
{ divider: true }, { divider: true },
{ command: 'dataGrid.findColumn' },
{ command: 'dataGrid.hideColumn' },
{ command: 'dataGrid.filterSelected' }, { command: 'dataGrid.filterSelected' },
{ command: 'dataGrid.clearFilter' }, { command: 'dataGrid.clearFilter' },
{ command: 'dataGrid.undo' }, { command: 'dataGrid.undo' },