jQWidgets Forums
jQuery UI Widgets › Forums › General Discussions › Lists › ComboBox › getItemByValue fails when spaces are in values
Tagged: ComboBox getItemByValue, combobox values
This topic contains 8 replies, has 2 voices, and was last updated by Peter Stoev 9 years, 9 months ago.
-
Author
-
See
http://jsfiddle.net/nq8xex9r/1/
Beside a minor problem that the items are not displayed with correct numbers of spaces, there is a more serious bug:
Click on the the button. You should get a second item (index=1). Instead, you get a fourth item (index=3).
Thanks for an prompt fix!
Most probably related bug:
Left button action is buggy, the right one works fine.
Hi jirih,
if that is an issue for you, then you may use alternative methods which use Index. The displaying of such labels is normal Web behavior of white-space CSS property. Example: http://jsfiddle.net/dwhsd7wk/. However, we will think about improvement options in future versions.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Yes, displaying of labels can be fixed in CSS. Getting wrong item is a jQWidgets’ issue. Fix it. Thanks.
Hi jirih,
If it is an issue in our sofware and we validate that, we will
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Looks like you have already fixed it today. Good job!
However, now you broke something else:
http://jsfiddle.net/nq8xex9r/2/Keep going!
Hi jirih
I already suggested you to use methods based on Index, in case you do not like how this one works.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
yes, I can write my own function for searching among the items. And I do it. The problem is that this bug causes problems also inside your code.
Check http://jsfiddle.net/1ch42b6q/
It is a very simple example. Click into the combobox. Write “A A”. You will see the same item in the listbox. Now, press a down arrow key. The item in the input field changes to “A_A”!
I understand that sometimes it could be useful to have a function getItemByValue effectively discarding all spaces but it cannot be used in cases where an exact match is what users expect.
Please, fix it. Thanks. I spent hours to debug this case. It wasn’t cheap.
Hi jirih,
In normal scenario you will never have such items, but even if you have then you have other methods which you can use. The issue here is very very minor and low priority.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.