Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

186
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda