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

Palette filter on label as well as id

This commit is contained in:
Nick O'Leary 2015-03-20 11:40:34 +00:00
parent 7a0ce0c957
commit 57c049b49f

View File

@ -232,7 +232,8 @@ RED.palette = (function() {
var re = new RegExp(val,'i'); var re = new RegExp(val,'i');
$(".palette_node").each(function(i,el) { $(".palette_node").each(function(i,el) {
if (val === "" || re.test(el.id)) { var currentLabel = $(el).find(".palette_label").text();
if (val === "" || re.test(el.id) || re.test(currentLabel)) {
$(this).show(); $(this).show();
} else { } else {
$(this).hide(); $(this).hide();