Code Monkey home page Code Monkey logo

Comments (5)

aaronfischer avatar aaronfischer commented on September 24, 2024 1

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.

offirgolan avatar offirgolan commented on September 24, 2024

@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.

aaronfischer avatar aaronfischer commented on September 24, 2024

@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.

offirgolan avatar offirgolan commented on September 24, 2024

@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.

allthesignals avatar allthesignals commented on September 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.