Comments (5)
Thanks @offirgolan . I ended up re-evaluating how I could make this work, long story short, its not a requirement for our API to receive those defaultValues (if the arrays match) so I was able to essentially just not set that specific query controller property if its expected value matched the defaultValues.
A bit of additional management involved but it seems to work fine in our case.
Looks like this is/was a non-issue of the add-on, thanks!
from ember-parachute.
@aaronfischer glad you're liking that addon!
You add "Jump" to the tags and hit "Set as Defaults" but it remains in the URI.
Is this the expected behavior?
This is actually intended behavior. Since we cant control whats in the URI, setDefaultQueryParamValue
and defaultValue
are only used to check for changes and give you the ability to reset your query params to their specified defaults.
EDIT:
I think this should be added to the documentation so others are not confused as well.
from ember-parachute.
@offirgolan Oh okay, thanks! So, if you don't mind, where would be the proper place to set the defaultValue to not have it appear in the URI?
I was thinking that if setDefaultQueryParamValue
was called in beforeModel
that should prevent it from being added to the URI? (but I'm not finding that to be true)
from ember-parachute.
@aaronfischer the URI default values are set by Ember on initial runtime. There currently is no way to change it no matter where you actually put the setDefaultQueryParamValue
logic 😞 .
I guess one way to do this might be to make your API call in an initializer and create your QueryParam map from there and mix it in to the appropriate controller.
from ember-parachute.
I guess one way to do this might be to make your API call in an initializer and create your QueryParam map from there and mix it in to the appropriate controller.
This is interesting and could be a way to approach my issue in #54. Curious if you have an example for it?
from ember-parachute.
Related Issues (20)
- Using this addon inside of an engine causes Route to be reopened twice HOT 1
- Exported service doesn't exist HOT 1
- Provide a way to get serialized QPs from the controller HOT 9
- Accessing the controller / services HOT 17
- Preventing a query param change HOT 3
- Upcoming RFC281 "native ES5 getters" incompatibility
- Setup hook not getting query params present in URL HOT 1
- Dynamically set query params HOT 5
- replaceRoute in setup sends incorrect event to queryParamsDidChange
- I'm an idiot - can you link code for the example HOT 4
- Support deserializing duplicate query params
- Ember 3.6 HandlerInfos Removal deprecation
- NAME_KEY is deprecated HOT 2
- Using key as reference to a service
- Changing query in setup hook HOT 2
- Unexpected values of queryParams on a controller using decorators
- Properties decorated with queryParam are undefined HOT 3
- Assertion Failed: Attempting to lookup an injected property on an object without a container HOT 1
- Uncaught TypeError: Cannot assign to read only property 'foostate' of object '[object Object]'
- Deprecation warning `deprecated-run-loop-and-computed-dot-access` blocking Ember 4 upgrade
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-parachute.