Search code examples
extjscomboboxfilteringextjs6.2

ETXJS 6.2.0 Combobox Filter Returns Mulitple Values


I have a combobox that's filtering a store based on an id from another drop down. However the filter seems to be returning all the values that START with the selected id.

xtype: 'combobox',
name: 'actor',
fieldLabel: 'Actor',
typeAhead: true,
forceSelection: true,
queryMode: 'local',
displayField: 'name',
valueField: 'id',
bind: {
  store: 'actorStore',
  value: 'actor.id',
  filters: [{
    property: 'customerId',
    value: '{customer.value}',
    disableOnEmpty: true
}

Solution

  • Try to set the filter's operator, see here:

    filters: [{
        property: 'customerId',
        value: '{customer.value}',
        operator: '=',
        disableOnEmpty: true
    }]
    

    (I don't know your ExtJS version, but I am not sure the combobox has a filters config, but the store surely has.)