Merge pull request #4023 from node-red/trigger-hide-nul-option

Hide trigger node repeat send  option if sending nothing
This commit is contained in:
Nick O'Leary 2023-02-02 10:22:40 +00:00 committed by GitHub
commit 9035de32c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -25,7 +25,7 @@
<select id="node-then-type" style="width:70%;">
<option value="block" data-i18n="trigger.wait-reset"></option>
<option value="wait" data-i18n="trigger.wait-for"></option>
<option value="loop" data-i18n="trigger.wait-loop"></option>
<option id="node-trigger-wait-loop" value="loop" data-i18n="trigger.wait-loop"></option>
</select>
</div>
<div class="form-row node-type-duration">
@ -181,6 +181,13 @@
$("#node-input-op2type").val('str');
}
$("#node-input-op1").on("change", function() {
if ($("#node-input-op1type").val() === "nul") {
$("#node-trigger-wait-loop").hide();
}
else { $("#node-trigger-wait-loop").show(); }
});
var optionNothing = {value:"nul",label:this._("trigger.output.nothing"),hasValue:false};
var optionPayload = {value:"pay",label:this._("trigger.output.existing"),hasValue:false};
var optionOriginalPayload = {value:"pay",label:this._("trigger.output.original"),hasValue:false};