Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 [#5040] Add unique key to Action component
Keys tell React which array item each component corresponds to, so that it can match them up later. They must be unique, see https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key Previously, the key was set to the index of the action as it occurred in the actions array. After deletion of an action, the ActionSet would be regenerated, and the keys for the actions will start counting from 0 again. This means the keys were not unique, and it created unexpected behaviour when deleting an action. Now, each Action will get a unique key using getUniqueRandomString.
- Loading branch information