mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-10 17:53:36 +02:00
This PR fixes an issue that would manifest when you navigated directly to the groups and tried to edit the group from the group card. When you were redirected to the edit groups view, the data fields would be empty. The root cause of this issue is that the data has not arrived over the wire before we load the UI, resulting in the UI showing an empty dataset. Normally, if this data came directly from useSWR, the app would re-render and display the data correctly. However, in this instance we are passing the data to an intermediary hook (useGroupForm) which does not have the same re-render logic. Therefore we are effectively working from stale data. We solve this issue by adding a container that resolves the group before the edit form is rendered, and that invokes the intermediary hook only when the data is available. |
||
---|---|---|
.. | ||
apiToken | ||
auth | ||
billing | ||
cors | ||
groups | ||
instance-admin | ||
invoice | ||
maintenance | ||
menu | ||
network | ||
projectRoles | ||
serviceAccounts | ||
users | ||
Admin.tsx | ||
AdminRedirect.tsx | ||
LazyAdmin.tsx | ||
LazyAdminExport.tsx |