Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
How to use GoJs addArrayItem or insertArrayItem

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 emediatly. 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.enter image description here enter image description here

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. enter image description here 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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!