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

Fix complex property editing in nuxeo-data-table

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.1, 1.1.2
    • Component/s: UI

      Description

      Let's say you have a pouet:contacts complex multi valued property, when using such edit layout in Web UI:

      <dom-module id="nuxeo-pouet-edit-layout">
        <template>
          <style>
            *[role=widget] {
              padding: 5px;
            }
            nuxeo-data-table {
            	height: 800px;
            }
          </style>
       
      
          <nuxeo-data-table items="{{document.properties.pouet:contacts}}" orderable="true" editable="true" role="widget">
            <nuxeo-data-table-column name="Name">
              <template>
                <div role="widget">[[item.name]]</div>
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Position">
              <template>
                <div role="widget">[[item.position]]</div>
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Role">
              <template>
                <nuxeo-directory-suggestion role="widget" value="[[item.role]]" label="Role" readonly="true" directory-name="role"></nuxeo-directory-suggestion>
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Expiry Date">
              <template>
                <div role="widget">[[item.expiryDate]]</div>
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-form>
              <template>
                <nuxeo-input value="{{item.name}}" label="Name" type="text"></nuxeo-input>
                <nuxeo-input value="{{item.position}}" label="Position" type="text"></nuxeo-input>
                <nuxeo-directory-suggestion value="{{item.role}}" label="Role" directory-name="role"></nuxeo-directory-suggestion>
                <nuxeo-input value="{{item.expiryDate}}" label="Expiry Date" type="text"></nuxeo-input>
              </template>
            </nuxeo-data-table-form>
          </nuxeo-data-table>
      
        </template>
      
        <script>
        Polymer({
          is: 'nuxeo-pouet-edit-layout',
          behaviors: [Nuxeo.LayoutBehavior],
          properties: {
      
            /**
               * @doctype Record
               */
            document: {
              type: Object,
            },
      
          }
        });
        </script>
      </dom-module>
      

      Clicking save does nothing and results in the following error in the console:

      Uncaught (in promise) RangeError: Maximum call stack size exceeded
          at extend (elements.html:8527)
          at extend (elements.html:15403)
          at extend (elements.html:15403)
          at extend (elements.html:15403)
          at extend (elements.html:15403)
          at extend (elements.html:15403)
          at extend (elements.html:15403)
          at extend (elements.html:15403)
          at extend (elements.html:15403)
          at extend (elements.html:15403)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 2 hours
                2h