Page 1 of 1

[REACT] Issues related to "Id collision"

Posted: Tue Sep 27, 2022 6:40 am
by jungo

Hi Bryntum team, I'm having a problem with the "Id collision" error.
Currently I am using the Tree Grid format like the example here: https://www.bryntum.com/examples/grid/tree/.
First, I used the sample here: https://bryntum.com/examples/scheduler/grouping/ then in my code there was only resourceStore.add (array_resources) when the data was added. But since switching to TreeGrid I get "Id collision" error. I've been looking for some solutions to fix this problem, but it's not done yet. I know ID must be unique so I want that when I execute add() function you can check if ID exists or not?. If yes then execute, if not then stop? Is this possible?

id_collision.jpg
id_collision.jpg (68.48 KiB) Viewed 305 times

Re: [REACT] Issues related to "Id collision"

Posted: Tue Sep 27, 2022 11:22 am
by mats

You can simply run getById to find out if the record already exists before you add?


Re: [REACT] Issues related to "Id collision"

Posted: Thu Sep 29, 2022 6:27 am
by jungo

@mats Thanks a lot. You saved my day :D