From ad6b18e66f71e8b4f87516e728d1478893b987c4 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 5 Jun 2020 16:00:02 +0100 Subject: [PATCH] Make catch/status/complete/link filter case-insensitive --- .../node_modules/@node-red/nodes/core/common/24-complete.html | 4 ++-- .../node_modules/@node-red/nodes/core/common/25-catch.html | 4 ++-- .../node_modules/@node-red/nodes/core/common/25-status.html | 4 ++-- .../node_modules/@node-red/nodes/core/common/60-link.html | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/common/24-complete.html b/packages/node_modules/@node-red/nodes/core/common/24-complete.html index 5f8fb7ffe..9c49648e3 100644 --- a/packages/node_modules/@node-red/nodes/core/common/24-complete.html +++ b/packages/node_modules/@node-red/nodes/core/common/24-complete.html @@ -50,13 +50,13 @@ style: "compact", delay: 300, change: function() { - var val = $(this).val().trim(); + var val = $(this).val().trim().toLowerCase(); if (val === "") { dirList.treeList("filter", null); search.searchBox("count",""); } else { var count = dirList.treeList("filter", function(item) { - return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1 + return item.label.toLowerCase().indexOf(val) > -1 || item.node.type.toLowerCase().indexOf(val) > -1 }); search.searchBox("count",count+" / "+candidateNodes.length); } diff --git a/packages/node_modules/@node-red/nodes/core/common/25-catch.html b/packages/node_modules/@node-red/nodes/core/common/25-catch.html index cbe2fdd7a..1fa94258f 100644 --- a/packages/node_modules/@node-red/nodes/core/common/25-catch.html +++ b/packages/node_modules/@node-red/nodes/core/common/25-catch.html @@ -65,13 +65,13 @@ style: "compact", delay: 300, change: function() { - var val = $(this).val().trim(); + var val = $(this).val().trim().toLowerCase(); if (val === "") { dirList.treeList("filter", null); search.searchBox("count",""); } else { var count = dirList.treeList("filter", function(item) { - return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1 + return item.label.toLowerCase().indexOf(val) > -1 || item.node.type.toLowerCase().indexOf(val) > -1 }); search.searchBox("count",count+" / "+candidateNodes.length); } diff --git a/packages/node_modules/@node-red/nodes/core/common/25-status.html b/packages/node_modules/@node-red/nodes/core/common/25-status.html index 032977c71..dc2f8893d 100644 --- a/packages/node_modules/@node-red/nodes/core/common/25-status.html +++ b/packages/node_modules/@node-red/nodes/core/common/25-status.html @@ -53,13 +53,13 @@ style: "compact", delay: 300, change: function() { - var val = $(this).val().trim(); + var val = $(this).val().trim().toLowerCase(); if (val === "") { dirList.treeList("filter", null); search.searchBox("count",""); } else { var count = dirList.treeList("filter", function(item) { - return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1 + return item.label.toLowerCase().indexOf(val) > -1 || item.node.type.toLowerCase().indexOf(val) > -1 }); search.searchBox("count",count+" / "+candidateNodes.length); } diff --git a/packages/node_modules/@node-red/nodes/core/common/60-link.html b/packages/node_modules/@node-red/nodes/core/common/60-link.html index 5cf1c409e..243d0bbc9 100644 --- a/packages/node_modules/@node-red/nodes/core/common/60-link.html +++ b/packages/node_modules/@node-red/nodes/core/common/60-link.html @@ -53,13 +53,13 @@ style: "compact", delay: 300, change: function() { - var val = $(this).val().trim(); + var val = $(this).val().trim().toLowerCase(); if (val === "") { treeList.treeList("filter", null); search.searchBox("count",""); } else { var count = treeList.treeList("filter", function(item) { - return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1 + return item.label.toLowerCase().indexOf(val) > -1 || item.node.type.toLowerCase().indexOf(val) > -1 }); search.searchBox("count",count+" / "+candidateNodes.length); }