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

Handle treeList labels as text not html

This commit is contained in:
Nick O'Leary 2019-02-11 16:15:25 +00:00
parent 894d28c60b
commit be1b9c0e43
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 14 additions and 1 deletions

View File

@ -15,6 +15,19 @@
**/ **/
(function($) { (function($) {
/**
* options:
* - minimumLength : the minimum length of text before firing a change event
* - delay : delay, in ms, after a keystroke before firing change event
*
* methods:
* - value([val]) - gets the current value, or, if `val` is provided, sets the value
* - count - sets or clears a sub-label on the input. This can be used to provide
* a feedback on the number of matches, or number of available entries to search
* - change - trigger a change event
*
*/
$.widget( "nodered.searchBox", { $.widget( "nodered.searchBox", {
_create: function() { _create: function() {
var that = this; var that = this;

View File

@ -148,7 +148,7 @@
if (item.icon) { if (item.icon) {
$('<span class="red-ui-treeList-icon"><i class="'+item.icon+'" /></span>').appendTo(label); $('<span class="red-ui-treeList-icon"><i class="'+item.icon+'" /></span>').appendTo(label);
} }
$('<span class="red-ui-treeList-label-text"></span>').html(item.label).appendTo(label); $('<span class="red-ui-treeList-label-text"></span>').text(item.label).appendTo(label);
if (item.children) { if (item.children) {
if (Array.isArray(item.children)) { if (Array.isArray(item.children)) {
that._addChildren(container,item.children,depth); that._addChildren(container,item.children,depth);