Direct Access
When search param is typed directly from URL, the debounce param will not be correctly updated, because the search
property is set in the route handler's setupController
hook.
In order to prevent this, you can set the debounce param in the same route handle
// routes/application.js
import Route from '@ember/routing/route';
export default Route.extend({
// ...
queryParams: {
search: {
refreshModel: true
}
},
// ...
setupController(controller) {
this._super(...arguments);
controller.set('debounceSearch', controller.get('search'));
}
// ...
});