Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remoteComplete wrap query in _filters #1308

Open
samanmohamadi opened this issue Feb 21, 2017 · 1 comment
Open

remoteComplete wrap query in _filters #1308

samanmohamadi opened this issue Feb 21, 2017 · 1 comment

Comments

@samanmohamadi
Copy link

samanmohamadi commented Feb 21, 2017

Hi, accourding to Docs With this config:

nga.field('post_id', 'reference')
        .targetEntity(post)
        .targetField(nga.field('title'))
        .remoteComplete(true, {
            refreshDelay: 300,
            // populate choices from the response of GET /posts?q=XXX
            searchQuery: function(search) { return { q: search }; }
        })
        .perPage(10) // limit the number of results to 10

It shoud request this url : /posts?q=XXX
but I don't know why it send this request: /posts?filters=%7B%22q%22:%22XXX%22%7D
which translate to: _filters={q:XXX}

@baleato
Copy link

baleato commented Jul 12, 2017

Hi @samanmohamadi, take a look at https://ng-admin-book.marmelab.com/doc/API-mapping.html#filtering

All filter fields are added as a serialized object passed as the value of the _filters query parameter. But you can change this behaviour by using a FullRequestInterceptor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants