[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Autocomplete: select event when item uses 'label' instead of 'value'

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6908610e3019b_2c17f3284324af@gitlab-sidekiq-low-urgency-cpu-bound-v2-56d5bcf7c5-rm5xj.mail>

Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
a434f72c by Landry Bitege at 2025-11-03T07:52:32+00:00
[FIX] Autocomplete: select event when item uses 'label' instead of 'value'
---
* [FIX] Autocomplete: select event when item uses 'label' instead of 'value'

See merge request tikiwiki/tiki!8760

- - - - -


1 changed file:

- src/js/vue-widgets/element-plus-ui/src/utils/applyAutocomplete.js


Changes:

=====================================
src/js/vue-widgets/element-plus-ui/src/utils/applyAutocomplete.js
=====================================
@@ -59,7 +59,8 @@ export default function applyAutocomplete(element, remoteSourceUrl = null, sourc
     });
 
     elementPlusUi.addEventListener("select", (event) => {
-        element.value = event.detail[0].value;
+        const key = valueKey || "value";
+        element.value = event.detail[0][key];
         element.dispatchEvent(new Event("change"));
         if (selectCb) {
             selectCb(event);



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a434f72ca1ecfa452f702d78b690cb88b421b9ab

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a434f72ca1ecfa452f702d78b690cb88b421b9ab
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.