Add support to _text attributes of multi-select boxes#54
Add support to _text attributes of multi-select boxes#54spiegela wants to merge 1 commit intomxriverlynn:masterfrom
Conversation
|
@spiegela there's another pull request that we're getting ready pull in, and it is going to get rid of the Can you explain how you use the |
|
The _text attributes make things convenient for me. In my app, I have a set of views that create a back-end query. It also sets up other views for displaying that query. I am planning to use the "value" of the select box for the query, and the "_text" attribute for views, with the human-readable version. Of course, without this feature, there are other ways to do this -- like make the selection value be an index of a collection, but this way is nice and easy. Thanks! |
|
still not sure what we should do with this... can you explain your scenario a little further, @spiegela? I'm not sure i understand why you need the _text value. I know when I originally wrote the code that uses _text, it was because I wasn't using Backbone correctly. I was using it to pull values from the select box and populate my model before sending it back to the server. What I should have done, was send all of the data back to the server and have the server respond with a _text version of the value, instead of relying on the client side code to track that. Is there a way for you to do something like this, or is it really going to be that much easier for you to have a _text attribute for your select boxes? |
The title (and commit message) kind of speak for themselves. I have some multi-select boxes, and without this patch, the "_text" attribute is pretty useless.
For example, with the view:
with both of these selected you'll have an attribute like:
With my patch, things will work more appropriately:
Hooray!
Specs are included, let me know what you think!