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

Improve selected event of nuxeo-data-table to include model

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.x, 3.0.x
    • Component/s: UI

      Description

      The current form of the selected event in nuxeo-data-table does not account for multiple data tables being used in one layout. This can be covered by including the model in the event details, for example:

      _onCheckBoxTap(e) {
                if (this.selectionEnabled) {
                  this.$.list.toggleSelectionForIndex(e.model.index);
                  const target = e.target || e.srcElement;
                  target.dispatchEvent(new CustomEvent('selected', {
                    composed: true,
                    bubbles: true,
                    detail: { index: e.model.index, shiftKey: e.shiftKey, model: e.model },
                  }));
                  this._updateFlags();
                }
              }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hmiskaryan Henry Miskaryan
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: