We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11e4297 commit 9c2f8e0Copy full SHA for 9c2f8e0
js/components/typeahead.js
@@ -73,6 +73,14 @@ Fliplet.FormBuilder.field('typeahead', {
73
return rules;
74
},
75
created: function() {
76
+ if (!!this.defaultValue && this.optionsType === 'manual') {
77
+ this.value = this.defaultValue.split(/\n/);
78
+ this.updateValue(this.name, this.value);
79
+ } else if (!Array.isArray(this.value) && this.optionsType === 'manual') {
80
+ this.value = [];
81
82
+ }
83
+
84
Fliplet.Hooks.on('beforeFormSubmit', this.onBeforeSubmit);
85
86
destroyed: function() {
0 commit comments