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

Fix wrong data initialization in selectivity

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.3
    • Fix Version/s: 2.3.1
    • Component/s: Selectivity

      Description

      In https://github.com/nuxeo/nuxeo-ui-elements/blame/master/widgets/nuxeo-selectivity.html#L363 there seems to be a misused of data:

      if (this.data) {
                options.data = this.data;
              } else {
                options.query = function(query) {
                  if (query.term.length < this.minChars) {
                    query.error("Please enter " + this.minChars + " or more character");
                    return;
                  }
                  // debounce requests
                  this.debounce('_selectivityQuery', function() {
                    this._query(query);
                  }.bind(this), 300);
                }.bind(this);
              }
      

      above it looks like being used to populate the available choices but according to https://arendjr.github.io/selectivity/ we are actually initializing the selection.

        Attachments

          Issue Links

            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 - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 2 hours
                  2h