Row selection before table fully inited failed
If a row was selected before table was fully initialized it would be unselected once the row was fully initialized.
This commit is contained in:
parent
4136da110f
commit
ace091c998
@ -152,6 +152,11 @@ let PillarTable = Vue.component('pillar-table-base', {
|
|||||||
return this.rowsSource.thenInit();
|
return this.rowsSource.thenInit();
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
let currentlySelectedIds = this.selectedItems.map(it => it._id);
|
||||||
|
if (currentlySelectedIds.length > 0) {
|
||||||
|
// User has clicked on a row while we inited the rows. Keep that selection!
|
||||||
|
tableState.selectedIds = currentlySelectedIds;
|
||||||
|
}
|
||||||
this.rowAndChildObjects.forEach(tableState.applyRowState.bind(tableState));
|
this.rowAndChildObjects.forEach(tableState.applyRowState.bind(tableState));
|
||||||
this.isInitialized = true;
|
this.isInitialized = true;
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user