[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] Element Plus Select: default selected values are not shown, ...

"Merci Jacob \(@mercihabam\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68b9e90dcd942_2cdd1d0708b6@gitlab-sidekiq-low-urgency-cpu-bound-v2-77d47f5746-ljkdt.mail>

Merci Jacob pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
4e0bde5f by Merci Jacob at 2025-09-04T19:24:52+00:00
[BP][FIX] Element Plus Select: default selected values are not shown, especially when these are empty
---
* [FIX] Element Plus Select: default selected values are not shown, especially when these are empty
---
* [FIX] Element Plus Select: default selected values are not shown, especially when these are empty

See merge request tikiwiki/tiki!8384

See merge request tikiwiki/tiki!8509

- - - - -


2 changed files:

- src/js/vue-widgets/element-plus-ui/src/components/Select/Select.vue
- src/js/vue-widgets/element-plus-ui/src/tests/components/Select.test.js


Changes:

=====================================
src/js/vue-widgets/element-plus-ui/src/components/Select/Select.vue
=====================================
@@ -120,6 +120,7 @@ export const DATA_TEST_ID = {
                 :data-testid="DATA_TEST_ID.SELECT_ELEMENT"
                 :remote-method="remoteMethod"
                 :remote="Boolean(remoteSourceUrl)"
+                :empty-values="[null, undefined]"
             >
                 <el-option-group 
                     v-if="grouped"


=====================================
src/js/vue-widgets/element-plus-ui/src/tests/components/Select.test.js
=====================================
@@ -71,7 +71,7 @@ describe("Select", () => {
         });
 
         expect(ElSelect).toHaveBeenCalledWith(
-            expect.objectContaining({ modelValue: JSON.parse(basicProps.value), remote: false }),
+            expect.objectContaining({ modelValue: JSON.parse(basicProps.value), remote: false, "empty-values": [null, undefined] }),
             expect.any(Object)
         );
 
@@ -114,6 +114,7 @@ describe("Select", () => {
                 "collapse-tags": true,
                 "max-collapse-tags": parseInt(givenProps.maxCollapseTags),
                 "multiple-limit": parseInt(givenProps.max),
+                "empty-values": [null, undefined],
             }),
             expect.any(Object)
         );



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/4e0bde5f17862b2a80bcc34e989cf0b6ba603de5
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.