Commit 850c2079 authored by anton's avatar anton
Browse files

Add optional 'handler' property to form fields (used for file upload results)

parent 94ded04e
Pipeline #79069 passed with stage
in 1 minute and 14 seconds
......@@ -13,6 +13,7 @@
:attributes="field.attributes",
:label="$t(field.label)",
:fieldLabel="field.fieldLabel ? $t(field.fieldLabel) : undefined",
:handler="field.handler",
:helper-label="$t(field.helperLabel)",
:error-label="$t(field.errorLabel)",
:class="{ 'col-xl-6': !field.fullWidth, 'col-12': field.fullWidth }"
......@@ -27,6 +28,7 @@
:attributes="field.attributes",
:label="$t(field.label)",
:fieldLabel="field.fieldLabel ? $t(field.fieldLabel) : undefined",
:handler="field.handler",
:helper-label="$t(field.helperLabel)",
:error-label="$t(field.errorLabel)",
:class="{ 'col-xl-6': !field.fullWidth, 'col-12': field.fullWidth }"
......
......@@ -24,7 +24,8 @@
'helperLabel',
'selectOptions',
'autocompleteOptions',
'uploadFields'
'uploadFields',
'handler'
],
data () {
return {
......@@ -86,6 +87,7 @@
},
onFileFinish (responses) {
this.local = responses
if (typeof this.handler === 'function') this.handler(responses)
}
},
created () {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment