Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected List index? issue when populating from knockout. #1395

Closed
Jab0rnal opened this issue May 24, 2016 · 8 comments
Closed

Selected List index? issue when populating from knockout. #1395

Jab0rnal opened this issue May 24, 2016 · 8 comments
Assignees
Labels
Milestone

Comments

@Jab0rnal
Copy link

Jab0rnal commented May 24, 2016

It seems that there is an issue when creating the options of the select picker with a knockout observable array.

Repro steps using this codepen

  1. Open the select, select somebody,
  2. Re-open the select, the correct person is selected <- working.
  3. Click the load more people button
  4. Open the select, select a person
  5. Re-open the select, the incorrect person is selected in the list. (It is always the one before, if you select the first the last one is selected) <- break.
@caseyjhol
Copy link
Member

Hrmmm...this has something to do with the placeholder. If you remove the title attribute, it works as expected.

@caseyjhol caseyjhol added the bug label May 24, 2016
@caseyjhol caseyjhol self-assigned this May 24, 2016
@Jab0rnal
Copy link
Author

Thanks for taking a look at this Casey, appreciate it. That was probably the only thing I didn't try to get the expected behaviour. Have you got any time frame for a release that will include the fix?
Its a great control that i would really like to keep using. Thanks for your hard work.

@caseyjhol
Copy link
Member

caseyjhol commented May 25, 2016

Hopefully I'll be able to have a fix out by next week, as part of v1.11.0. In the meantime, you might try adding multiple data-max-options="1" if you need to keep an option unselected by default.

@Jab0rnal
Copy link
Author

Thanks Casey, I look forward to the new release. Thanks for the suggested work around also, I will give that a go tommorrow.

@Jab0rnal
Copy link
Author

Any update on v1.11.0 release date?

@stodge
Copy link

stodge commented Nov 24, 2016

This may relate to an issue I'm having - any updates on a fix? Thanks.

@caseyjhol caseyjhol added this to the v1.13.0 milestone Jul 19, 2017
@caseyjhol
Copy link
Member

The title option should always be the first option, but depending on the way the options are updated, that isn't always the case (you'll see that it is moved to the end after loading more people in your example). This will be fixed in v1.13.0.

@caseyjhol
Copy link
Member

Available in v1.13.0-alpha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants