hotFix: vnSelectFilter
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
67982b3bbb
commit
72d51a53a8
|
@ -79,7 +79,7 @@ onMounted(() => {
|
|||
if ($props.url && $props.modelValue) fetchFilter($props.modelValue);
|
||||
});
|
||||
|
||||
async function filter(val, options) {
|
||||
function filter(val, options) {
|
||||
const search = val.toString().toLowerCase();
|
||||
|
||||
if (!search) return options;
|
||||
|
@ -111,15 +111,15 @@ async function fetchFilter(val) {
|
|||
return dataRef.value.fetch({ fields, where, order: sortBy, limit });
|
||||
}
|
||||
|
||||
async function filterHandler(val, update) {
|
||||
function filterHandler(val, update) {
|
||||
update(
|
||||
async () => {
|
||||
if (!$props.defaultFilter) return;
|
||||
if ($props.url) {
|
||||
myOptions.value = await fetchFilter(val);
|
||||
return;
|
||||
}
|
||||
myOptions.value = await filter(val, myOptionsOriginal.value);
|
||||
// if ($props.url) {
|
||||
// myOptions.value = await fetchFilter(val);
|
||||
// return;
|
||||
// }
|
||||
myOptions.value = filter(val, myOptionsOriginal.value);
|
||||
},
|
||||
(ref) => {
|
||||
if (val !== '' && ref.options.length > 0) {
|
||||
|
|
Loading…
Reference in New Issue