ember-model-select icon indicating copy to clipboard operation
ember-model-select copied to clipboard

Change query parameters

Open candunaj opened this issue 4 years ago • 1 comments

Hi, is it possible to construct custom query parameters, because I have existing api which is little bit different. Or is there possibility for ember-model-select to call store.query('modelName", filterQuery), then I would be able to overwrite query method in adapter and change query parameters.

candunaj avatar Sep 09 '20 12:09 candunaj

You can customize the names of the parameters with the searchKey and searchProperty attributes. Setting both will result in something like ?searchProperty[searchKey]=value. You can also pass a query argument, which should be an object merged with the rest of the request.

There's some existing issues which allow for some more freedom, but they have not been implemented yet:

  • https://github.com/nickschot/ember-model-select/issues/80
  • https://github.com/nickschot/ember-model-select/pull/81#issuecomment-638941981

nickschot avatar Jan 15 '21 21:01 nickschot