I have been using the behavior described below for my contrib node to define typeField as a list of options including one which is 'undefined': GitHub - dxdc/node-red-contrib-join-wait: Node-RED module to wait for incoming messages from different input paths to arrive within a fixed time window..
As of v2, something changed and now correlationTopic is not persisted in the editor window (though, it is persisted properly if I export the node JSON, and the node also functions properly).
So, if I create a new node, and set correlationTopic to something like msg.xyz, it will show properly in the exported JSON, but just not in the editor window after saving the changes.
It has something to do with the undefined option. If I remove hasValue: false for instance, while the behavior of undefined then becomes undesired, it will show the correlationTopic. This seems like a bug in the core somewhere, but not sure if there is an issue with the typeField definition. This used to work properly in NR 1.3.x.
$('#node-input-correlationTopic').typedInput({
default: this.correlationTopicType || types.Undefined,
typeField: $('#node-input-correlationTopicType'),
types: [
{ value: 'undefined', label: RED._('common.type.undefined'), hasValue: false },
'msg',
'flow',
'global',
'jsonata',
],
});
