Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

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

$
0
0
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

Viewing all articles
Browse latest Browse all 4756

Trending Articles