Skip to content

Commit 87bfa56

Browse files
author
JelteMX
committed
On reset change
1 parent 08478ad commit 87bfa56

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/store/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ export class NodeStore {
116116
debug
117117
}: NodeStoreConstructorOptions) {
118118
this.contextObject = contextObject || null;
119-
this.dataResetOnContextChange = typeof dataResetOnContextChange !== 'undefined' ? dataResetOnContextChange : false;
119+
this.dataResetOnContextChange =
120+
typeof dataResetOnContextChange !== "undefined" ? dataResetOnContextChange : false;
120121
this.columns = columns;
121122
this.validColumns = validColumns;
122123
this.selectFirstOnSingle = selectFirstOnSingle;
@@ -144,7 +145,11 @@ export class NodeStore {
144145
@action
145146
setContext(obj?: mendix.lib.MxObject): void {
146147
this.debug("Store: setContext", obj);
147-
if (this.contextObject !== null && obj && (this.contextObject.getGuid() !== obj.getGuid() || this.dataResetOnContextChange)) {
148+
if (
149+
this.contextObject !== null &&
150+
obj &&
151+
(this.contextObject.getGuid() !== obj.getGuid() || this.dataResetOnContextChange)
152+
) {
148153
if (this.needToCalculateInitialParents) {
149154
this.calculateInitialParents = true;
150155
if (this.needToRestoreStateOnContextChange) {

0 commit comments

Comments
 (0)