fix UI change events

- use `this` not `node` in UI change events
This commit is contained in:
Steve-Mcl 2022-03-12 15:02:25 +00:00
parent b7ee46d400
commit e57774e121
1 changed files with 3 additions and 3 deletions

View File

@ -240,7 +240,7 @@
oneditprepare: function() {
const node = this;
$("#node-input-useAuth").on("change", function() {
if ($(node).is(":checked")) {
if ($(this).is(":checked")) {
$(".node-input-useAuth-row").show();
// Nodes (< version 0.20.x) with credentials but without authentication type, need type 'basic'
if (!$('#node-input-authType').val()) {
@ -255,7 +255,7 @@
RED.tray.resize();
});
$("#node-input-authType-select").on("change", function() {
const val = $(node).val();
const val = $(this).val();
$("#node-input-authType").val(val);
if (val === "basic" || val === "digest") {
$(".node-input-basic-row").show();
@ -270,7 +270,7 @@
RED.tray.resize();
});
$("#node-input-method").on("change", function() {
if ($(node).val() == "GET") {
if ($(this).val() == "GET") {
$(".node-input-paytoqs-row").show();
} else {
$(".node-input-paytoqs-row").hide();