Skip to content

Commit

Permalink
Fix #629
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrancart committed Sep 9, 2024
1 parent db348f4 commit 3f570d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/sparnatural/components/SparnaturalComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SparnaturalComponent extends HTMLComponent {
specProvider: ISparnaturalSpecification;
actionStore: ActionStore;
BgWrapper: BgWrapper;
SubmitSection: SubmitSection;
submitSection: SubmitSection;
variableSection: VariableSection;
catalog:Catalog;
// filter that is applied to optional/not exists green arrows, based on its ID
Expand All @@ -38,7 +38,7 @@ class SparnaturalComponent extends HTMLComponent {
this.BgWrapper = new BgWrapper(this, this.specProvider).render();
// display the submit button only if a callback was provided
if(getSettings().submitButton) {
this.SubmitSection = new SubmitSection(this).render();
this.submitSection = new SubmitSection(this).render();
}
this.variableSection = new VariableSection(
this,
Expand Down Expand Up @@ -87,12 +87,12 @@ class SparnaturalComponent extends HTMLComponent {

// method is exposed from the HTMLElement
enablePlayBtn = () =>{
this.SubmitSection.playBtn.removeLoading();
this.submitSection.playBtn.removeLoading();
}

// method is exposed from the HTMLElement
disablePlayBtn = () => {
this.SubmitSection.playBtn.disable();
this.submitSection.playBtn.disable();
}

setQuiet(quiet:boolean) {
Expand Down
3 changes: 2 additions & 1 deletion src/sparnatural/statehandling/actions/GenerateQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ export class QueryGenerator {
this.fireQueryUpdatedEvent(payload);

// re-enable submit button if it was disabled
this.actionStore.sparnatural.SubmitSection.enableSubmit();
// note that the submitSection may not be present in case submitButton = false in the attributes
this.actionStore.sparnatural.submitSection?.enableSubmit();

}
}
Expand Down

0 comments on commit 3f570d9

Please sign in to comment.