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

MaterialComboBox setAcceptableValues is not setting indexes. #154

Closed
chinshaw opened this issue Nov 3, 2016 · 4 comments · Fixed by #162
Closed

MaterialComboBox setAcceptableValues is not setting indexes. #154

chinshaw opened this issue Nov 3, 2016 · 4 comments · Fixed by #162
Assignees
Labels
Milestone

Comments

@chinshaw
Copy link

chinshaw commented Nov 3, 2016

When I create a MaterialComboBox and invoke setAcceptableValues the combo box will show the values correctly. However the value will always be null. I tracked it down to the getSelectedIndex() is always returning -1.

If I use addItem(String, T) the combo box works correctly and returns the correct index for the value.

A quick look shows a divergence in how the Option is added with addItem(T value) and addItem(String text, T value).

@kevzlou7979
Copy link
Contributor

Nice catch let me check this out

On Fri, Nov 4, 2016 at 5:23 AM Chris Hinshaw notifications@github.com
wrote:

When I create a MaterialComboBox and invoke setAcceptableValues the combo
box will show the values correctly. However the value will always be null.
I tracked it down to the getSelectedIndex() is always returning -1.

If I use addItem(String, T) the combo box works correctly and returns the
correct index for the value.

A quick look shows a divergence in how the Option is added with addItem(T
value) and addItem(String text, T value).


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#154, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AC_iFyCBm0fsDGQs6imiDb7BCbfdVFpCks5q6lDkgaJpZM4Ko7xF
.

@BenDol
Copy link
Contributor

BenDol commented Nov 5, 2016

What version are you using?

@BenDol BenDol closed this as completed Nov 5, 2016
@BenDol BenDol reopened this Nov 5, 2016
@chinshaw
Copy link
Author

chinshaw commented Nov 7, 2016

I was using the 2.0-SNAPSHOT.

@kevzlou7979
Copy link
Contributor

Fixed via 4ab18de

@kevzlou7979 kevzlou7979 added this to the 2.0 milestone Nov 18, 2016
@kevzlou7979 kevzlou7979 self-assigned this Nov 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants