Fix for #659
This commit is contained in:
parent
ebb6c2ff74
commit
a17ee3d9bf
3 changed files with 46 additions and 16 deletions
|
@ -150,12 +150,18 @@ class Table extends Component {
|
|||
values: keysToFetch
|
||||
});
|
||||
|
||||
const oldSelectionMap = this.selectionMap;
|
||||
this.selectionMap = new Map();
|
||||
for (const row of response.data) {
|
||||
const key = row[this.props.selectionKeyIndex];
|
||||
if (this.selectionMap.has(key)) {
|
||||
this.selectionMap.set(key, row);
|
||||
if (oldSelectionMap.has(key)) {
|
||||
this.selectionMap.set(key, row)
|
||||
}
|
||||
}
|
||||
|
||||
if (this.selectionMap.size !== oldSelectionMap.size) {
|
||||
this.notifySelection(this.props.onSelectionChangedAsync, this.selectionMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue