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

nuxeo-data-table should work with lists of primitive types

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.10.0
    • Component/s: UI
    • Upgrade notes:
      Hide

      `nuxeo-data-table` is now able to create/edit new entries even for items of primitive type.

      Limitation: if the list of items is empty and the type of the items is expected to be a primitive and the table definition has more than 1 column, then the table will not be able to create new entries (the created item will be an object).

      Show
      `nuxeo-data-table` is now able to create/edit new entries even for items of primitive type. Limitation : if the list of items is empty and the type of the items is expected to be a primitive and the table definition has more than 1 column, then the table will not be able to create new entries (the created item will be an object).
    • Sprint:
      nxGang Sprint 9.1.9
    • Story Points:
      3

      Description

      nuxeo-data-table should work with lists of primitive types, such as:

      <nuxeo-data-table items='["a", "b", "c"]' orderable editable>
              <nuxeo-data-table-column>
                <template>
                  <div>[[item]]</div>
                </template>
              </nuxeo-data-table-column>
      
              <nuxeo-data-table-form>
                <template>
                  <paper-input value="{{item}}" label="Value"></paper-input>
                </template>
              </nuxeo-data-table-form>
      </nuxeo-data-table>
      

      Issue is probably related with:
      https://github.com/nuxeo/nuxeo-ui-elements/blob/master/nuxeo-data-table/iron-data-table.html#L695

      We are creating a new entry as object even if we are dealing with a list of a primitive type.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: