Skip to content

Commit

Permalink
Merge branch 'dev' into FP-2935-default-flow-parameters-not-showing-w…
Browse files Browse the repository at this point in the history
…hen-clicking-the-edit-button
  • Loading branch information
diasnad authored Sep 13, 2024
2 parents 50b44a6 + 693d48f commit 46b401e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# TBD

- [FP-2935](https://movai.atlassian.net/browse/FP-2935): Default flow parameters not showing when clicking the edit button
- [FP-2946](https://movai.atlassian.net/browse/FP-2946): Deleting the "Label" filter from lib-ide BaseStore results in a 500 response in certain conditions


# v1.2.7

Expand Down
17 changes: 14 additions & 3 deletions src/store/BaseStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BaseStore extends StorePluginManager {
this._scope = model.SCOPE;
this._name = name || "Store";
this._title = title || "Generic Store";
this.pattern = pattern || { Scope: this.scope, Name: "*", Label: "*" };
this.pattern = pattern || { Scope: this.scope, Name: "*"}
this.observer = observer;
this.docManager = docManager;
this.protectedDocs = [];
Expand Down Expand Up @@ -171,9 +171,20 @@ class BaseStore extends StorePluginManager {
}

_onSetDoc(doc) {
if (!this.getDoc(doc.name)) {
this.newDoc(doc.name);
const docInst = this.getDoc(doc.name);
if (!docInst) {
const newDoc = this.newDoc(doc.name);
newDoc
.enableObservables(false)
.setIsNew(false)
.setIsLoaded(false)
.setDirty(false)
.enableObservables(true);
}

// if the doc is existing and not dirty, we should update
// it but that is non-trivial. We should open a new issue
// for it
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/store/DBSubscriber/DBSubscriber.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ class DBSubscriber extends StoreAbstractPlugin {
onUpdate(data) {
clearTimeout(this[symbols.timer]);

let docName = Object.keys(data["key"][this.scope])[0];
this[symbols.timer] = setTimeout(
() => this.updateDocument(data.patterns[0].Name),
() => this.updateDocument(docName),
DEBOUNCE_TIME
);
}
Expand Down

0 comments on commit 46b401e

Please sign in to comment.