Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    [bug] ComboBoxItem in filter dont work with emptyDisplayValue+specialValues correctly

    Hi,

    found that if I'm trying to use ComboBoxItem in ListGrid header with `emptyDisplayValue` and `specialValues` I'm getting strange results.

    Code:
    ListGrid.create({
       dataSource: 'id',
       filterByCell: true,
       showFilterEditor: true,
       fields: [
          {
             name: 'test',
             filterEditorProperties: {
               emptyDisplayValue: "All",
               specialValues: {'**emptyValue**':"All"},
             }
          }
       ]
    });
    Then criteria is sent to server with filled "All" value the same as it would be unknown value.

    Bugfix is here:

    Code:
                isc.ComboBoxItem.addMethods({
                    getCriteriaValue : function () {
                        if (this.displayField != null && this.addUnknownValues &&
                            !this._showingLoadingDisplayValue &&
                            !this.explicitChoice)
                        {
                            var value = this.Super("getCriteriaValue", arguments);
    
                            return (value !== this.emptyDisplayValue) ? value : undefined;
                        }
                        return this.Super("getCriteriaValue", arguments);
                    }
                });
    please apply this bugfix to your source code.

    PS. don't you plan someday to go on github or similiar VCS where contribution would be easier?









    affected/tested on: SmartClient_v100p_2015-06-04_LGPL
    Last edited by antanas.arvasevicius; 7 Jun 2015, 01:58.

    #2
    We have made a change to address this. If the user types the explicit empty display value we'll no longer treat this as a partial string to filter against on the Display field.
    You can pick this up in the latest nightly build (June 22 or above) in 10.0 or 10.1

    Regards
    Isomorphic Software

    Comment


      #3
      Thank you!

      I'm gonna test it out, but our case was not about user typing explicitly.
      It was a case that combo box filters was getting emptyDisplayValue on first load, and then I click filter, all these values was sent to server (same as user has been entered it explicitly), no need any typing to test it. just click filter button.

      I think your described case is related to this but not exact.

      Comment

      Working...
      X