[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Element Plus Select: default selected values are not shown, especially when these are empty

"Merci Jacob \(@mercihabam\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68b9bd61645d7_2cdd1949067d@gitlab-sidekiq-low-urgency-cpu-bound-v2-6cbff9b687-7kdrn.mail>

Merci Jacob pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
710b0439 by Merci Jacob at 2025-09-04T16:16:46+00:00
[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

- - - - -


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
=====================================
@@ -147,6 +147,7 @@ export const DATA_TEST_ID = {
                 :remote-method="remoteMethod"
                 :remote="Boolean(remoteSourceUrl)"
                 v-bind="$attrs"
+                :empty-values="[null, undefined]"
             >
                 <template v-if="grouped">
                     <el-option-group 


=====================================
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, 10),
                 "multiple-limit": parseInt(givenProps.max, 10),
+                "empty-values": [null, undefined],
             }),
             expect.any(Object)
         );



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

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