Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda