I have a custom node currently in use that allows for a selection to be made in the config panel via drop down which is a dynamic list of end points. Current behavior is on selection, the endpoint is accessed and the data is parsed and saved to a static property value of the node/config for use downstream.
If the endpoint has had a data change, our saved value in node/config is no longer reflective of the actual endpoint data.
I would like to maintain compatibility with the property name in use, but instead of the property supplying the saved static value, I would like the property to call a function to retrieve/parse/return the data to the caller without introducing a breaking change for current users of the node ideally.
- defining a function as the value for the relevant key in defaults
- removing the key from defaults, defining the function outside of defaults
Neither has worked.
Is it possible to define a property as a function for a custom node in node-red ?