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

Switching Saved Searches not Working with Dropdown Aggregates

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Incomplete
    • Affects Version/s: 2.4.0
    • Fix Version/s: None
    • Component/s: Selectivity, UI, Widgets

      Description

      When using nuxeo-dropdown-aggregation in a page provider search form, switching between saved searches that contain values for the dropdown aggregates doesn't work. 

      An error is raised after nuxeo-selectivity's _resolveEntry returns no value:

      Uncaught TypeError: Cannot convert undefined or null to object
          at hasOwnProperty (<anonymous>)
          at nuxeo-app.html-236.js:494
          at Array.find (<anonymous>)
          at HTMLElement._idFunction (nuxeo-app.html-236.js:494)
          at prep (nuxeo-app.html-236.js:256)
          at Array.map (<anonymous>)
          at nuxeo-app.html-236.js:265
          at HTMLElement._initSelection (nuxeo-app.html-236.js:421)
          at Object.initSelection (nuxeo-app.html-236.js:264)
          at MultipleInput.setValue (nuxeo-app.html-235.js:5635)
      

      I found that the loop in _resolveEntry doesn't find an existing value. In that case, this function doesn't return a value.

      https://github.com/nuxeo/nuxeo-ui-elements/blob/f03857c5cbe5d49bfca1c06b6a3bf118f1471679/widgets/nuxeo-selectivity.js#L7133-L7137

       

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: