javascript - Combine remote filter and local filter -


Now, I have a store that contains remoteFilter: true and

 (Code) 'from', property: 'to', value: ext.getCmp ("ruleFrom"). GetValue ()}  Ext.getStore ("AccessRuleStore") AddFilter ([new Ext.util.Filter ({id: 'from'), New Ext.util.Filter ({id: 'to', Properties: 'From', Value: Extension .getcmp ("ruleTo"). GetValue ()})));   

This addFilter automatically activates a call on the server, where to and to Is used to calculate which is the rule of sending the client, because only the server knows that to and to values ​​match what rule (for some reason , The value from to the and to values ​​can not be reported to the client).

On the other hand, the rules can become active or passive, and the indicator is always transmitted to the customer. Now I want to add a checkbox "Show only active rules", which filters the rules of (rule.get ("active") === true) on the client side.

Is it possible, and how? Whenever I add filters to the store, the store thinks it's a remote filter, and ask the server what to do ...

You can use store.filterBy which only local filters.

Example

  rulesStore.filterBy (function (rule) {Return rule.get ('active');});    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -