We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use remote of select2 like this
select2
// Server router Picker.route('addressRemote/:term', function (params, req, res, next) { var items = [{id: params.term, text: params.term} // Proplem res.end(JSON.stringify(items)); }); // Client $('[name="addressId"]').select2({ placeholder: "Search address", allowClear: true, ajax: { url: "/addressRemote", type: "GET", dataType: 'json', delay: 250, data: function (params) { return {term: params}; }, results: function (data, page) { return {results: data}; }, cache: true }, minimumInputLength: 3 });
How to get query data form ajax on server?
The text was updated successfully, but these errors were encountered:
I think you need to set the client url as /addressRemote/something
/addressRemote/something
Sorry, something went wrong.
Could I get by query or not?
query
ajax: { .......... data: function (params) { return {term: params}; },
Please example.
Check out https://github.com/meteorhacks/picker#middlewares and https://www.npmjs.com/package/body-parser to get the post payload.
No branches or pull requests
I use remote of
select2
like thisHow to get query data form ajax on server?
The text was updated successfully, but these errors were encountered: