forked from verdnatura/salix-front
refs #6677 url
This commit is contained in:
parent
8f870f8d67
commit
33332a5c04
|
@ -81,6 +81,7 @@ const filter = (val, options) => {
|
||||||
const filterHandler = (val, update) => {
|
const filterHandler = (val, update) => {
|
||||||
update(
|
update(
|
||||||
() => {
|
() => {
|
||||||
|
if ($props.url) return;
|
||||||
if ($props.defaultFilter)
|
if ($props.defaultFilter)
|
||||||
myOptions.value = filter(val, myOptionsOriginal.value);
|
myOptions.value = filter(val, myOptionsOriginal.value);
|
||||||
},
|
},
|
||||||
|
@ -100,13 +101,13 @@ watch(options, (newValue) => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
v-if="$props.url"
|
||||||
ref="dataRef"
|
ref="dataRef"
|
||||||
:url="$props.url"
|
:url="$props.url"
|
||||||
@on-fetch="(data) => (dataRef = data)"
|
@on-fetch="(data) => setOptions(data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<QSelect
|
<QSelect
|
||||||
v-if="dataRef"
|
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:options="myOptions"
|
:options="myOptions"
|
||||||
:option-label="optionLabel"
|
:option-label="optionLabel"
|
||||||
|
|
|
@ -200,7 +200,8 @@ function supplierRefFilter(val) {
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('supplierFk')"
|
:label="t('supplierFk')"
|
||||||
v-model="data.supplierFk"
|
v-model="data.supplierFk"
|
||||||
option-value="id"
|
option-value="id
|
||||||
|
"
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
url="Suppliers"
|
url="Suppliers"
|
||||||
:filter="{ fields: ['id', 'code'], order: 'code' }"
|
:filter="{ fields: ['id', 'code'], order: 'code' }"
|
||||||
|
|
Loading…
Reference in New Issue