nocode-js/sequential-workflow-designer

Property value of dynamically rendered component in designer isnt updating immediately

Closed this issue · 5 comments

Hey @b4rtaz ,

I have a component that I am using in the designers html , which accepts the an @input() property "reset".

When I change the value of this property , it doesnt seem to call the ngOnChanges of my component.

I need to select outside the step of the designer and click on the step again, for the new value to reflect

I'm pretty sure i am missing something. Would appreciate your help.

<ng-template` #stepEditor let-editor>
    <h2 class='step-header'>Step {{editor.step.name}}</h2>
      <ng-container *ngIf="editor.step.type === 'task'">
        <h3>Input parameters</h3>
        <ng-container *ngIf="editor.step.properties.input_parameters.length > 0">
            <div *ngFor="let element of editor.step.properties.input_parameters;let i = index">
              <div *ngIf="element?.inputType==='file'" class="upload-container">
                    <file-upload
                        (selectionChange)="onFileUploadUpdate($event,element,editor,i,designer,element.name)"
                        allowedFileExtensions=".xlsx, .xls, .pdf, .doc"
                        [resetFile]=resetFile>
                    </file-upload>
              </div>
            </div>
        </ng-container>
      </ng-container>
    </h2>
</ng-template>

I am setting the value of resetFile to false initially and then to true later in my ts file.

What version are you using?

@b4rtaz I am on angular 12 and 0.13.3 version of the designer

The 0.13.7 version contains a fix, please update to it or the newest.

Great! hope this supports angular 12. Will check it out and close the issue if it works! Thank you @b4rtaz

Works like a charm!! thanks a ton @b4rtaz