ng-admin-postgrest
ng-admin-postgrest copied to clipboard
support filters
According to postgrest, Ng-admin need to change default url pattern of filter request as get request did.
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?
listView.filters([
nga.field('year').label('Year')
])
input "2005" then filter, then parameter is like _filters={"year":"2005"}
, it should be year=eq.2005
Which version of ng-admin are you using?
"ng-admin": "~0.6.0"
, using 0.7.0 fix some other problem like exportFields
, but not this one
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.
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?