diff --git a/frontend-html/src/model/entities/DataViewLifecycle/DataViewLifecycle.ts b/frontend-html/src/model/entities/DataViewLifecycle/DataViewLifecycle.ts
index 5d4654a97d..d4f508cc2b 100644
--- a/frontend-html/src/model/entities/DataViewLifecycle/DataViewLifecycle.ts
+++ b/frontend-html/src/model/entities/DataViewLifecycle/DataViewLifecycle.ts
@@ -52,12 +52,10 @@ export class DataViewLifecycle implements IDataViewLifecycle {
return this.monitor.isWorkingDelayed;
}
- disposers: any[] = [];
-
@action.bound
start(): void {
if (isLazyLoading(this)) {
- this.disposers.push(this.startSelectedRowReaction());
+ this.startSelectedRowReaction();
}
}
@@ -92,6 +90,12 @@ export class DataViewLifecycle implements IDataViewLifecycle {
await this.onSelectedRowIdChangeImm();
}
+ if (this._selectedRowReactionDisposer){
+ return;
+ }
+
+ this.stopSelectedRowReaction();
+
const self = this;
return (this._selectedRowReactionDisposer = reaction(
() => {
diff --git a/frontend-html/src/model/entities/FormScreenLifecycle/FormScreenLifecycle.tsx b/frontend-html/src/model/entities/FormScreenLifecycle/FormScreenLifecycle.tsx
index 442f3a848f..522d8b6e48 100644
--- a/frontend-html/src/model/entities/FormScreenLifecycle/FormScreenLifecycle.tsx
+++ b/frontend-html/src/model/entities/FormScreenLifecycle/FormScreenLifecycle.tsx
@@ -726,7 +726,8 @@ export class FormScreenLifecycle02 implements IFormScreenLifecycle02 {
yield this.updateTotalRowCount(rootDataView);
yield*this.readFirstChunkOfRows({
rootDataView: rootDataView,
- preloadIsDirty: preloadIsDirty
+ preloadIsDirty: preloadIsDirty,
+ runChangeRowReaction: true
});
}
}
@@ -881,6 +882,7 @@ export class FormScreenLifecycle02 implements IFormScreenLifecycle02 {
*readFirstChunkOfRows(args: {
rootDataView: IDataView,
+ runChangeRowReaction: boolean
preloadIsDirty?: boolean
}): any {
const rootDataView = args.rootDataView;
@@ -923,7 +925,9 @@ export class FormScreenLifecycle02 implements IFormScreenLifecycle02 {
}
rootDataView.restoreViewState();
} finally {
- rootDataView.lifecycle.startSelectedRowReaction(!args.preloadIsDirty);
+ if(args.runChangeRowReaction){
+ rootDataView.lifecycle.startSelectedRowReaction(!args.preloadIsDirty);
+ }
this.monitor.inFlow--;
}
}
@@ -967,7 +971,8 @@ export class FormScreenLifecycle02 implements IFormScreenLifecycle02 {
do {
this._readFirstChunkOfRowsScheduled = false;
yield*this.readFirstChunkOfRows({
- rootDataView: rootDataView
+ rootDataView: rootDataView,
+ runChangeRowReaction: false
});
} while (this._readFirstChunkOfRowsScheduled);
} finally {