0

Setting the extraParams to be something works just fine:

extraParams: {
    x: 1,
    foo: 'bar'
}

But how can one set anything other than = in there? For example > or <, or != ?

In other words, what if I wanted x!=1 instead of x=1?

4

1 回答 1

1

You're confusing extraParams for filters.

Filters are built-in functions to filter a store. This operation can be handed off to the backend if you set remoteFilter to true. A filter consists of a property, operator, value tupel like the one you have in mind.

An extraParam on the other hand is just a parameter that is appended to the request "as-is". It has no special meaning attached by default. If you want to do filtering through extraParams, you'll have to do that by hand and interpret every parameter you send on your own in the backend. You could add an operator parameter or call it comparator, but how that parameter is used depends completely on your custom backend logic.

于 2017-10-26T19:14:00.903 回答