-
When calling Utils.getTree(immutableTree), the order of the rules and groups might not get preserved. For example, I create a group with 1 rules, where the first rule id is: 88bba8ba-cdef-4012-b456-717fa7c50478, and the second rule id is: 889a989a-4567-489a-bcde-f17fa7d96b7b, then the JSON tree that I'm getting does not preserve the correct order of the items (I'm not sure it it's a bug or not, since JSON does not guarantee the order of its items). The JsonTree is being send to the backend server, and saved into a DB, and later on loaded, and in this case, the order of the rules is "reversed" due to the order of the ids. I've noticed that if I call JSON.stringify on the JsonTree, then the result string is somehow with the correct order (I don't know if it's by accident, or by design, so I can't count on it). What is the best way of storing the conditions tree on the server and preserving the order of the children of groups and sub groups. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Going to fix this with #672 - |
Beta Was this translation helpful? Give feedback.
-
Thanks |
Beta Was this translation helpful? Give feedback.
Going to fix this with #672 -
children1
will be array instead of object