Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1565

Fix OK Button in nuxeo-data-table usage when the slot deleteDocumentAction is disabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.18
    • Component/s: UI
    • Release Notes Summary:
      The popup for nuxeo-data-table disappears when the value is added.
    • Backlog priority:
      600
    • Sprint:
      UI - 2022-13, UI COOLDOWN - 2022-13, UI - 2023-01

      Description

      You must use Chrome >= 100 to observe the bug.

      Steps to reproduce the bug:

      1. Define a document type with a multi-string field
      2. Define the edit layout for this document type and use a nuxeo-data-table element for the multi-string field. For example
            <nuxeo-data-table role="widget" items="{{document.properties.city:rues}}" orderable="true" editable="true" name="rues">
              <nuxeo-data-table-column name="Rues">
                <template>
                  [[item]]
                </template>
              </nuxeo-data-table-column>
        
              <nuxeo-data-table-form>
                <template>
                  <nuxeo-input value="{{item}}" label="Rues" type="text" name="rues"></nuxeo-input>
                </template>
              </nuxeo-data-table-form>
            </nuxeo-data-table>
        
      3. Go to Designer > Buttons and disable the button deleteDocumentAction. It will add these lines to the -bundle.html file
        <!-- Contribution of element 'nuxeo-delete-document-button' for slot 'DOCUMENT_ACTIONS' -->
        <nuxeo-slot-content name="deleteDocumentAction" slot="DOCUMENT_ACTIONS" order="15" priority="1" disabled>
          <template>
            <nuxeo-delete-document-button document="[[document]]"></nuxeo-delete-document-button>
          </template>
        </nuxeo-slot-content>
        
      4. deploy the project (you can use the attached jar WEBUI-1005.jar to ease the reproduction)
      5. as a non admin, log in to Nuxeo and navigate to your personal workspace
      6. create a document of this new type
      7. edit the document
      8. add a value and validate with OK
      9. observe that the popup is still visible with the Ok and Cancel buttons

      Expected behavior: the popup should disappear when the value is added

      PS : if you still see the Delete icon among the document actions, do a force refresh

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 day
                  1w 1d