jQuery UI Widgets › Forums › Lists › ComboBox › Combobox autocomplete with multiple words
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 6 years, 6 months ago.
-
Author
-
Hi, I have a strange issue with autocomplete. My list contains first and last names separate by a space.
John Frankinson
Pete Johnson
Clair FranklynIf you start typing “Jo”, the autocomplete will select Pete Johnson and highlight Jo from the last name. Even when you type “John “, it will not select John Frankinson. In fact the autocomplete only works on the last name, it never selects anything from the first word in the list.
This is my code:
var source = { datatype: "json", datafields: [ { name: 'ClientName' }, { name: 'ClientId' } ], url: url, async: true }; var dataAdapter = new $.jqx.dataAdapter(source); // Create a jqxComboBox $("#jqxClientName").jqxComboBox({ selectedIndex: 0, theme: 'energyblue', autoComplete: true, searchMode: 'containsignorecase', source: dataAdapter, displayMember: 'ClientName', valueMember: 'ClientId', width: 200, height: 25 });
I also tried searchMode: ‘startswithignorecase’. This also only matches the last name, not the first.
Any suggestions please?
Hello Pietervk,
I tested this example and it seems to work fine.
Could you clarify is there any error message?Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo,
Thanks for the example.
there is no error message, it just select the second word, it skips all that just match the first word, unlike your example. Perhaps it has to do with the datasource?Best regards
Pieter
Hello Pietervk,
In my example I implement
autoComplete: true
it demonstrates the items that match the searched text.
And for the search mode issearchMode: 'containsignorecase'
.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.