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 14, 2024
1 parent ab5321c commit 20bd521
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ui/widgets/nuxeo-selectivity.js
Original file line number Diff line number Diff line change
Expand Up @@ -7358,10 +7358,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 20bd521

Please sign in to comment.