ng-admin-postgrest icon indicating copy to clipboard operation
ng-admin-postgrest copied to clipboard

support filters

Open megayu opened this issue 8 years ago • 6 comments

According to postgrest, Ng-admin need to change default url pattern of filter request as get request did.

megayu avatar Jul 13 '15 12:07 megayu

Isn't it what's already done in https://github.com/marmelab/ng-admin-postgrest/blob/master/main.js#L39-L55? Do you actually see a bug? If yes, can you describe it?

fzaninotto avatar Jul 13 '15 13:07 fzaninotto

listView.filters([
    nga.field('year').label('Year')
])

input "2005" then filter, then parameter is like _filters={"year":"2005"}, it should be year=eq.2005

megayu avatar Jul 19 '15 15:07 megayu

Which version of ng-admin are you using?

fzaninotto avatar Jul 21 '15 09:07 fzaninotto

"ng-admin": "~0.6.0", using 0.7.0 fix some other problem like exportFields, but not this one

megayu avatar Jul 23 '15 09:07 megayu

Yep, same issue here.

I added a addFullRequestInterceptor as explain here https://github.com/marmelab/ng-admin/blob/master/doc/API-mapping.md#filtering

params[filter] = 'eq.' + params._filters[filter];

Need some improvements though.

pleyo avatar Sep 09 '15 10:09 pleyo

It looks like the code running on http://marmelab.com/ng-admin-postgrest still has the _filters behavior. If you've got new code to fix that can you deploy it to the demo server please?

begriffs avatar Feb 02 '16 20:02 begriffs