Giter Site home page Giter Site logo

backbone.chooser's People

Contributors

brian-mann avatar samccone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

backbone.chooser's Issues

Move model chosen flag to internal property.

Because Backbone.Chooser uses a model attribute to store the chosen state, when saving the model, the chosen flag is also sent in the request.

In my scenario, the chosen field is not part of the original data that populated the model. My API doesn't recognize it in the schema, which causes an error.

Would it be possible to set the flag on a "private" property for the model?

bug in collection.unchoose(models, [options])

Seems to only work if all the passed models are chosen. As soon as the for loop hits an unchosen model it breaks the loop and the effect is the not all passed models get unchosen.

Possibly not a bug, but should be in readme that it will only accept chosen models.

SingleChooser - add the ability to unchoose a selected model

It would be nice to be able to unchoose chosen model in SingleChooser, because right now one has to:

var maybeModel = collection.getFirstChosen(); 
if (maybeModel) {
    collection.unchoose(maybeModel);
}

Maybe like with MultiChooser. getChosen() and MultiChooser. getFirstChosen(), the MultiChooser. chooseNone() can be available on SingleChooser.

Thank You

Unit Tests

Hey Brian,

I'm almost done writing unit tests for this behavior in our implementation, maybe it'd be a better idea if we unit-test the plugin though? Would you be interested in that?

Thanks,

  • Steven

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.