Skip to content

Commit

Permalink
Rerender the Mapping actions dropdown when permissions are changed
Browse files Browse the repository at this point in the history
This fixes a bug of Mappings actions dropdown menu options that are always disabled.

As a followup for
kubev2v#636, we now need
to re-render the Storage/Network Mappings actions dropdown menu once the
user's permissions are changed.

The root cause is that since the user's access permissions are set to false at loading till it is synced,
the menu options are disabled at start and need to be re-rendered once
the data is synced.

Signed-off-by: Sharon Gratch <[email protected]>
  • Loading branch information
sgratch committed Sep 12, 2023
1 parent 13b681b commit 0198b26
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function useMappingActions<T extends CommonMapping>({
disabledTooltip: t('Managed mappings can not be deleted'),
},
],
[t, resourceData],
[t, resourceData, canPatch, canDelete],
);

return [actions, true, undefined];
Expand Down

0 comments on commit 0198b26

Please sign in to comment.