Skip to content

Commit

Permalink
✨ : add support for complex variable types
Browse files Browse the repository at this point in the history
  • Loading branch information
juwit committed Apr 12, 2021
1 parent aa9dcf7 commit a9eddec
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/main/client/app/pages/stacks/stack-variable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@
:description="description"
>
<b-input
v-if="! isListRegex"
v-if="! isListRegex && ! complexType"
v-model="editableValue"
:state="validAndEmit().result"
trim
@input="$emit('input', editableValue)"
/>
<b-textarea
v-if="complexType"
v-model="editableValue"
:state="validAndEmit().result"
trim
max-rows="10"
@input="$emit('input', editableValue)"
/>
<b-select
v-if="isListRegex"
v-model="editableValue"
Expand All @@ -29,6 +37,10 @@
type: String,
required: true,
},
type: {
type: String,
required: true,
},
description: {
type: String,
required: true,
Expand Down Expand Up @@ -64,6 +76,9 @@
// also adding empty string to the result to be able to not select anything !
return ['', ...this.validationRegex.match(listExtractRegex)];
},
complexType() {
return this.type !== 'string' && this.type !== 'number';
},
},
methods: {
Expand Down

0 comments on commit a9eddec

Please sign in to comment.