1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

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';
}