@v-c/select 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Select.js +5 -2
- package/package.json +2 -2
package/dist/Select.js
CHANGED
|
@@ -565,6 +565,9 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
565
565
|
onSearch: toRef(props, "onSearch"),
|
|
566
566
|
autoClearSearchValue: toRef(props, "autoClearSearchValue")
|
|
567
567
|
}, toRef(props, "mode"));
|
|
568
|
+
const normalizedOptionFilterProps = computed(() => {
|
|
569
|
+
return searchConfig.value?.optionFilterProp;
|
|
570
|
+
});
|
|
568
571
|
const mergedFilterOption = computed(() => {
|
|
569
572
|
if (searchConfig.value.filterOption === void 0 && props.mode === "combobox") return false;
|
|
570
573
|
return searchConfig.value.filterOption;
|
|
@@ -579,7 +582,7 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
579
582
|
};
|
|
580
583
|
const mergedSearchValue = computed(() => internalSearchValue.value || "");
|
|
581
584
|
const childrenOptionsRef = shallowRef([]);
|
|
582
|
-
const parsedOptions = useOptions(toRef(props, "options"), childrenOptionsRef, mergedFieldNames,
|
|
585
|
+
const parsedOptions = useOptions(toRef(props, "options"), childrenOptionsRef, mergedFieldNames, normalizedOptionFilterProps, toRef(props, "optionLabelProp"));
|
|
583
586
|
const valueOptions = computed(() => parsedOptions.value.valueOptions);
|
|
584
587
|
const labelOptions = computed(() => parsedOptions.value.labelOptions);
|
|
585
588
|
const mergedOptions = computed(() => parsedOptions.value.options);
|
|
@@ -654,7 +657,7 @@ var Select_default = /* @__PURE__ */ defineComponent({
|
|
|
654
657
|
if (!existOptions(val)) cloneOptions.push(createTagOption(val, item.label));
|
|
655
658
|
});
|
|
656
659
|
return cloneOptions;
|
|
657
|
-
}), mergedFieldNames, mergedSearchValue, mergedFilterOption,
|
|
660
|
+
}), mergedFieldNames, mergedSearchValue, mergedFilterOption, normalizedOptionFilterProps);
|
|
658
661
|
const filledSearchOptions = computed(() => {
|
|
659
662
|
if (props.mode !== "tags" || !mergedSearchValue.value || filteredOptions.value.some((item) => item[props.optionFilterProp || "value"] === mergedSearchValue.value)) return filteredOptions.value;
|
|
660
663
|
if (filteredOptions.value.some((item) => item[mergedFieldNames.value.value] === mergedSearchValue.value)) return filteredOptions.value;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/select",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.14",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"vue": "^3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@v-c/overflow": "^1.0.3",
|
|
33
32
|
"@v-c/trigger": "^1.0.11",
|
|
33
|
+
"@v-c/overflow": "^1.0.3",
|
|
34
34
|
"@v-c/virtual-list": "^1.0.6",
|
|
35
35
|
"@v-c/util": "^1.0.14"
|
|
36
36
|
},
|