Fix template to default typed input field

to close #1697
This commit is contained in:
Dave Conway-Jones 2018-04-16 11:14:15 +01:00
parent 9d22a86ec8
commit a327fd85e2
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
1 changed files with 5 additions and 1 deletions

View File

@ -88,7 +88,7 @@
category: 'function',
defaults: {
name: {value:""},
field: {value:"payload", validate: RED.validators.typedInput("fieldType")},
field: {value:"payload", validate:RED.validators.typedInput("fieldType")},
fieldType: {value:"msg"},
format: {value:"handlebars"},
syntax: {value:"mustache"},
@ -106,6 +106,10 @@
},
oneditprepare: function() {
var that = this;
if (!this.field) {
this.field = 'payload';
$("#node-input-field").val("payload");
}
if (!this.fieldType) {
this.fieldType = 'msg';
}