I have an array of choices maintained independently to use commonly in all diagram nodes.
var customVariables = ["select","Add new"];
If someone selects the “Add new” option from any drop-down that user can add another option to this array and it needed to display in all dropdowns immediately. for this, I edited the DataInspector.js file ‘buildPropertyRow’ method. so that I can prompt a input and push the data to the array. screenshots as follows.
But the issue is after the insertion, the code will call updateAllProperties() method and all inputs will be updated. but in this state select option still have the value Add new even after I set it to the newly added value. I need to change this behaviour. To do that I used setDataProperty method after new data has been added. but now it duplicates inputs in the inspector view as in the picture.
I go through a lot of articles and seems to have a solution if I use addArrayItem or insertArrayItem. but there is no example of how to use these methods and still not sure this will help me with my problem as well.
so are these methods gonner help me or how do I overcome this issue are my questions.