Uploaded image for project: 'Apps Development Framework'
  1. Apps Development Framework
  2. ADF-2032

Using Viewer in overlay mode only works once

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Unprioritized
    • Resolution: Resolved
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
    • Sprint:
      ADF Sprint 35

      Description

      When using the viewer in overlay mode, the viewer only displays the first time.

      Wiring up the document list and the viewer like this:

      <adf-document-list
        [currentFolderId]="-my-"
        [contentActions]="true"
        (preview)="showPreview($event)">
      </adf-document-list>
      
      <adf-viewer
        [showViewer]="showViewer" 
        [overlayMode]="true" 
        [fileNodeId]="nodeId"
        (goBack)="onGoBack($event)">
      </adf-viewer>
      
      ... and the TS:
      
        showPreview(event) {
          this.showViewer = false;
          if (event.value.entry.isFile) {
            this.nodeId = event.value.entry.id;
            this.showViewer = true;
            console.log(event.value.entry);
          }
        }
      
        onGoBack(event: any) {
          this.showViewer = false;
          this.nodeId = null;
        }
      

      Double clicking in the document list opens the viewer and all is good. Close the viewer (hit escape or click the arrow), then try to open the same (or another) document and nothing happens.

      The (preview) event is fired properly with a node, but nothing happens when showFile is set to true the second time.

        TestRail: Results

          Attachments

            Issue Links

              Structure

                Activity

                  People

                  • Assignee:
                    cjalba Cristina Jalba
                    Reporter:
                    ohejlskov Ole Hejlskov
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    3 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved:

                      TestRail: Cases

                        Structure Helper Panel