Ensure columns with different visibility group retain their config

This commit is contained in:
Adomas Venčkauskas 2020-06-03 11:52:02 +03:00 committed by Dan Stillman
parent cbbff600a6
commit 2f72ed17b7
2 changed files with 8 additions and 1 deletions

View file

@ -827,6 +827,12 @@ class VirtualizedTable extends React.Component {
this._jsWindow.destroy();
}
componentDidUpdate(prevProps) {
if (this.props.id !== prevProps.id) {
this._columns = new Columns(this);
}
}
_setAlternatingRows() {
if (this.props.alternatingRowColors) {
this._jsWindow.innerElem.style.background = `

View file

@ -2761,13 +2761,14 @@ var ItemTree = class ItemTree extends LibraryTree {
}
const visibilityGroup = this.collectionTreeRow.visibilityGroup;
const prefKey = this.id + "-" + visibilityGroup;
const prefKey = this.id;
if (this._columnsId == prefKey) {
return this._columns;
}
this._columnsId = prefKey;
this._columns = [];
this._columnPrefs = null;
let columnsSettings = this._getColumnPrefs();