Filter Nodes event

Hello,

I am looking for an event/function which actually filters the nodes when anything written in search box input.

Can it be possible to call the same event on node red initialization??

Thanks

@Steve-Mcl @Colin @afelix

I think we need a bit more information. Where are you trying to do this, is this related to your previous work in modifying part of the node-red core? Are you creating a custom node? Are you working in a flow? Are you looking for a custom node to do this for you? Context please, tell us what you’re doing, what your current and end goal is, and what exactly you’re hoping to accomplish here.

Hi @afelix ,

 I am trying to find out the event which is called when i type anything in the filter textbox also i am i am curious to know whether it is possible to call that event on node red initialization...??

Please put core development questions in the development category so people understand what you're asking.

Question, why are you making so many modifications to the core?

Are you also going to contribute to the core of node-red?

Why don't you discuss your goals with the lead developers? Perhaps you have some valid and useful progress - you could work with the team - in the spirit of open source & everyone benefiting from each other?

The filter box in the editor has an accompanying component in the UI code that’s available for developers to use but partially undocumented.
It can be found in the API docs listed as UI widget: https://nodered.org/docs/api/ui/searchBox/
The search dialog you’re referring to is located here in the sources, and the events it activates on are listed in its init function.
https://github.com/node-red/node-red/blob/master/packages/node_modules/%40node-red/editor-client/src/js/ui/search.js

And please, as Steve asks, put questions related to modifying Node-RED’s internals in the #development category rather than #general, it helps to get your questions answered easier, and will ensure that the people attempting to help have some knowledge of what you’re doing. Yes, General is described as “not sure where else”, but these questions are all related to core development, so for future reference please use that category for these kind of questions :slight_smile:

One more thing, the contents of that search box/results are populated on the client side in the editor. I’m not sure if what you’re asking is available as such in the runtime, but can be gained there likely by looking through the RED.nodes code.

It's a text input that has a change listener on it which calls internal code to filter the palette.

If you want to prefilter the palette on load, then you could set the value if the input and trigger it's change listener.

The code for the whole palette is in src/js/ui/palette.js.

Ok will ask this kid of questions in core development

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.