innoq / iqvoc

iQvoc - A SKOS(-XL) Vocabulary Management System for the Semantic Web
http://iqvoc.net/
Other
117 stars 44 forks source link

attempted to replace jQuery UI Autocomplete with Typeahead #318

Closed FND closed 9 years ago

FND commented 9 years ago

⚠ work in progress, not yet ready to merge

this is an aborted attempt to get rid of jQuery UI

the main issue is that Typeahead doesn't seem to support the distinction between label/caption and value, so selecting a suggested entry always results in the corresponding value (a technical descriptor which shouldn't be exposed in the UI) being written to the respective input field

additional shortcoming compared to the current jQuery UI-based implementation:

FND commented 9 years ago

I remain confused about displayKey, so I've just created a minimal test case: http://sandbox.tiddlyspace.com/_/d734f816-edd3-4c47-b2f5-c73325765134

AFAICT, the displayKey setting is used for both the drop-down menu's labels and also for the field value - that is, selecting "Hello" ends up submitting "Hello" (label property) rather than "foo" (value property, which seems to be ignored entirely). Am I missing anything?