question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

filter nodes - Filtering select should use the actual node name - not the DOM-rendered name

See original GitHub issue

In the “Filter Nodes” filtering search, top of the left nav, I’ve found a behaviour I’d describe as a bug in that:

Say you have a sub module called, “My Module Foo”. The “Foo” will wrap, visually, in the sidebar nav:

My Module
Foo

But, if you go to search for the specific module in the filtering select and type, “My Module Foo” nothing is found! To find it you have to leave the space out between where it wraps. Instead, searching by, “My ModuleFoo” finds the item. I think this is bad and therefore filing a bug on the UI.

node-red: ~1.0.3 On Win10, Chrome: 78.0.3904.108 (Official Build) (64-bit) (cohort: Stable)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dceejaycommented, Dec 21, 2019

You had offered to do it, and the other guy jumped in. Once it was pointed out - he apologised and withdrew his pull request. We want to encourage more people to contribute and leaping in ahead of them won’t encourage anybody…

Anyway net is the code was not merged - so please feel free to go ahead and create your own fix - or indeed approve his as long as it is tested and works. I haven’t checked it out so have no idea if it is the correct fix or not yet.

PS: Also don’t start adding another issue to this one… Either start another - or better yet, discuss it on the forum first. 😃

1reaction
okhiroyukicommented, Dec 21, 2019

@neillindberg Hi. This seems to be occurring because the text is acquired in the following part.

packages/node_modules/@node-red/editor-client/src/js/ui/palette.js

    function filterChange(val) {
        var re = new RegExp(val.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'),'i');
        $("#red-ui-palette-container .red-ui-palette-node").each(function(i,el) {
            var currentLabel = $(el).find(".red-ui-palette-label").text();  // ← the part
            var type = $(el).attr("data-palette-type");
            if (val === "" || re.test(type) || re.test(currentLabel)) {
                $(this).show();
            } else {
                $(this).hide();
            }
        });

Example

Demo for subflow in subflow is recognized as Demo forsubflow insubflow .

スクリーンショット 2019-12-21 9 02 47
Read more comments on GitHub >

github_iconTop Results From Across the Web

Filtering element based on existence of child node
Use the filter() function: ... First you can select all "a" elements inside a "li" element: ... Then you can select, for each...
Read more >
Add collection members by node type using Collection Filters
The Geometry Generators filter includes history nodes such as makeNurbCone and polySphere. This filter was previously named Geometry and NURBS.
Read more >
6. Document Object Model Filters and Iterators
Filters allow the user to "filter out" nodes. Each filter contains a user-written function that looks at a node and determines whether or...
Read more >
Lightning Aura Components Developer Guide
used to store the filtered list of contacts when an option is selected on the lead source dropdown menu. The lightning:layout.
Read more >
Setting up Interactive Render Filters - Foundry Learn
A filter can consist of more than one change to the recipe and it is the equivalent of appending the filter nodes to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found