Hi,
Is there a way to configure type_ahead on a field to work like svySearch, to return values not necesary at the beginning of the dataprovider?
svySearch returns values on any part of the dataprovider but typeAhead only return the values that start with that text. You can use % at the beginning that that is not intuitive for end users.
Regards
Hi,
yes, you can set this property either at element level, or at application level:
// set only at element level
elements.typeahead.putClientProperty(APP_NG_PROPERTY.VALUELIST_CONTAINS_SEARCH, true);
// set globally for alll valuelist search
application.putClientProperty(APP_NG_PROPERTY.VALUELIST_CONTAINS_SEARCH, true);
the client property that can be set to always do a like search when filtering over valuelist on a typeahead like component. So a component that has a valuelist as a property and uses user input to search in that valuelist. By default it uses a like search with a % at the end (startsWith search on the fields of the valuelist). But this makes it a like %value% so a contains search. This can be set on the element (element.putClientProperty() or on a application wide level (application.putClientProperty()) DEFAULT: false
Regards,
Paolo
Thank you!
Works perfect.
I could not find this in the documentation for typeAhead
Hmmm, It is buried in reference doc:
https://docs.servoy.com/reference/servo … ins_search
…But we are right now working on a Value List guide. Will make a note to mention this one! Thanks for the feedback.