Skip to content

Added parameter change_by_text #1079

Closed
wants to merge 2 commits into from

3 participants

@jbosse
jbosse commented Mar 12, 2013

This allows you to set the parameter to true and have the change detection be based on the text values of the selected options.
This fixes issue #1024

Jimmy Bosse Added parameter change_by_text
This allows you to set the parameter to true and have the change detection be based on the text values of the selected options.
This fixes issue #1024
a5cab8d
@jbosse jbosse closed this Mar 12, 2013
@jbosse jbosse reopened this Mar 12, 2013
@jbosse
jbosse commented Mar 12, 2013

I had trouble getting cake build to run on my office windows machine. I kept getting a "Cannot call method 'parse' of undefined' when it tries to minify the built chosen.jquery.js file. As a result I was not able to commit the built and minified files.

@kenearley kenearley was assigned Apr 17, 2013
@kenearley

@jbosse Sorry for the late response. This looks good. I'm just wondering if we should automatically fall back to checking for text if there is no val() instead of having another option to set up.

@pfiller Thoughts?

@pfiller
pfiller commented Apr 18, 2013

I'm always resistant to the idea of adding new configurable options. When possible, I prefer to solve an issue in a way that 'just works'. In this case, I think @kreativemart's idea in #962 is right on:

I was thinking this... Instead of checking with the value, we should keep the selected item's index in that particular select.

If instead of storing the current value of the field, we store the current selectedIndex, we don't need to care about whether or not a value actually exists. It's easy, cross-browser and requires zero config. I'm going to close this pull request and open a new one implementing that.

Thanks @jbosse

@pfiller pfiller closed this Apr 18, 2013
@pfiller
pfiller commented Apr 18, 2013

Here is the PR for using selectedIndex #1147

@jbosse
jbosse commented Apr 18, 2013

I agree that #1147 is a better solution. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.