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) => {
|
||||
update(
|
||||
() => {
|
||||
if ($props.url) return;
|
||||
if ($props.defaultFilter)
|
||||
myOptions.value = filter(val, myOptionsOriginal.value);
|
||||
},
|
||||
|
@ -100,13 +101,13 @@ watch(options, (newValue) => {
|
|||
|
||||
<template>
|
||||
<FetchData
|
||||
v-if="$props.url"
|
||||
ref="dataRef"
|
||||
:url="$props.url"
|
||||
@on-fetch="(data) => (dataRef = data)"
|
||||
@on-fetch="(data) => setOptions(data)"
|
||||
auto-load
|
||||
/>
|
||||
<QSelect
|
||||
v-if="dataRef"
|
||||
v-model="value"
|
||||
:options="myOptions"
|
||||
:option-label="optionLabel"
|
||||
|
|
|
@ -200,7 +200,8 @@ function supplierRefFilter(val) {
|
|||
<VnSelectFilter
|
||||
:label="t('supplierFk')"
|
||||
v-model="data.supplierFk"
|
||||
option-value="id"
|
||||
option-value="id
|
||||
"
|
||||
option-label="nickname"
|
||||
url="Suppliers"
|
||||
:filter="{ fields: ['id', 'code'], order: 'code' }"
|
||||
|
|
Loading…
Reference in New Issue