Node property resets itself


My custom node property resets itself after re-opening it to reconfigure.
I am editing it as it is seen in the below image.


But if I re-open it after deploying, the Search for property resets itself to All as seen in the below picture.


While the Output property does not show this behaviour.

Here is the code for the related part.

defaults: {
            name: {value:""},
            searchFor: {value:""},
            searchForType: {value: ""},
            output: {value:""},
            outputType: {value: ""}

oneditprepare: function() {
                        value: "All",
                        label: "All",
                        hasValue: false
                        value: "Name",
                        label: "Local Name"
                typeField: "#node-input-searchForType"
                        value: "Peripheral",
                        label: "",
                        options: ["MAC", "Peripheral", "Data"]
                typeField: "#node-input-searchForType"

It seems like I need to define a custom behaviour as it is explained here. I would appreciate any hint on this.


typeField: $("#node-input-searchForType")

Also, have you created a hidden input for node-input-searchForType?

Hi @Steve-Mcl,

Yes I created hidden inputs. I have realized thanks to you that typeField: "#node-input-searchForType" for the node-input-output was wrong. I have changed it to typeField: "#node-input-outputType" and it works pretty well.

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