Fix inputValue not being respected in Input Prompt
This commit is contained in:
parent
78b644a463
commit
61ca4be3ac
@ -132,7 +132,7 @@
|
||||
@input="$root.$emit('change-detected')"
|
||||
@search="searchWorkflows"
|
||||
/>
|
||||
<!-- Clearable -->
|
||||
|
||||
<c-input-select
|
||||
v-else-if="a.input.type === 'select'"
|
||||
v-model="a.value"
|
||||
|
||||
@ -57,7 +57,7 @@ export const prompts = Object.freeze([
|
||||
},
|
||||
{
|
||||
ref: 'refetchRecords',
|
||||
meta: { short: 'Refreshes all record values on the page' },
|
||||
meta: { short: 'Refresh all record values on the page' },
|
||||
},
|
||||
{
|
||||
ref: 'notification',
|
||||
@ -123,7 +123,7 @@ export const prompts = Object.freeze([
|
||||
parameters: [
|
||||
{ name: 'owner', types: ['User', 'ID'], required: false },
|
||||
{ name: 'title', types: ['String'] },
|
||||
{ name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
|
||||
{ name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants }, default: 'primary' } } } },
|
||||
{ name: 'message', types: ['String'], required: true },
|
||||
{ name: 'label', types: ['String'] },
|
||||
{
|
||||
@ -131,6 +131,9 @@ export const prompts = Object.freeze([
|
||||
types: ['String'],
|
||||
meta: {
|
||||
visual: {
|
||||
input: {
|
||||
type: 'select',
|
||||
properties: {
|
||||
options: [
|
||||
{ value: 'text', text: 'Text' },
|
||||
{ value: 'number', text: 'Number' },
|
||||
@ -141,6 +144,9 @@ export const prompts = Object.freeze([
|
||||
{ value: 'time', text: 'Time' },
|
||||
],
|
||||
},
|
||||
default: 'text',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{ name: 'inputValue', types: ['String'] },
|
||||
@ -163,11 +169,17 @@ export const prompts = Object.freeze([
|
||||
types: ['String'],
|
||||
meta: {
|
||||
visual: {
|
||||
input: {
|
||||
type: 'select',
|
||||
properties: {
|
||||
options: [
|
||||
{ value: 'select', text: 'Select' },
|
||||
{ value: 'radio', text: 'Radio' },
|
||||
],
|
||||
},
|
||||
default: 'select',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{ name: 'value', types: ['String', 'Array'] },
|
||||
|
||||
@ -1,15 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<p v-if="!!message" v-html="message" />
|
||||
<p
|
||||
v-if="!!message"
|
||||
v-html="message"
|
||||
/>
|
||||
|
||||
<b-form-group
|
||||
:label="label"
|
||||
label-class="text-primary"
|
||||
>
|
||||
<b-input
|
||||
v-model="value"
|
||||
:type="type"
|
||||
:disabled="loading"
|
||||
v-model="value"
|
||||
/>
|
||||
</b-form-group>
|
||||
<b-button
|
||||
@ -35,19 +38,16 @@ const validTypes = [
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'CPromptInput',
|
||||
|
||||
extends: base,
|
||||
name: 'c-prompt-input',
|
||||
|
||||
data () {
|
||||
return {
|
||||
value: undefined
|
||||
value: undefined,
|
||||
}
|
||||
},
|
||||
|
||||
beforeMount() {
|
||||
this.value = this.pVal('value')
|
||||
},
|
||||
|
||||
computed: {
|
||||
type () {
|
||||
const t = this.pVal('type', 'text')
|
||||
@ -60,7 +60,11 @@ export default {
|
||||
|
||||
label () {
|
||||
return this.pVal('label', '')
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
beforeMount () {
|
||||
this.value = this.pVal('inputValue')
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ export default {
|
||||
|
||||
payload: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
|
||||
@ -33,8 +34,8 @@ export default {
|
||||
return this.payload[k]
|
||||
}
|
||||
|
||||
return { '@type': defType, '@value': defValue}
|
||||
}
|
||||
return { '@type': defType, '@value': defValue }
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user