Skip to content

Commit

Permalink
ELEMENTS-1657: Fix nuxeo-selectivity error during _dataChanged function
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuljain-dev committed Oct 7, 2024
1 parent 78fcbbe commit fcd79eb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ui/widgets/nuxeo-selectivity.js
Original file line number Diff line number Diff line change
Expand Up @@ -7357,11 +7357,12 @@ typedArrayTags[weakMapTag] = false;
if (this._selectivity) {
this._selectivity.setOptions({ items: this._wrap(this.data) });
const selectivityData = this._selectivity.getData();
const wrapData = this._wrap(this.data);
const newData = wrapData.filter(obj => selectivityData.some(item => item.id === obj.id));
if (newData.length !== 0 && JSON.stringify(newData) !== JSON.stringify(selectivityData)) {
this._selectivity.setData(newData);
}
if(selectivityData){
const wrapData = this._wrap(this.data);
const newData = wrapData.filter(obj => selectivityData.some(item => item.id === obj.id));
if (newData.length !== 0 && JSON.stringify(newData) !== JSON.stringify(selectivityData)) {
this._selectivity.setData(newData);
}
}
}

Expand Down

0 comments on commit fcd79eb

Please sign in to comment.