Sort CT/ST in RBAC edit role

This commit is contained in:
mfrachet 2021-09-27 16:37:55 +02:00
parent 8245603a5d
commit b17bc9c7a1
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,8 @@ const StyledBox = styled(Box)`
`;
const ContentTypes = ({ isFormDisabled, kind, layout: { actions, subjects } }) => {
const sortedSubjects = [...subjects].sort((a, b) => a.label > b.label);
return (
<StyledBox background="neutral0">
<GlobalActions actions={actions} kind={kind} isFormDisabled={isFormDisabled} />
@ -17,7 +19,7 @@ const ContentTypes = ({ isFormDisabled, kind, layout: { actions, subjects } }) =
actions={actions}
isFormDisabled={isFormDisabled}
pathToData={kind}
subjects={subjects}
subjects={sortedSubjects}
/>
</StyledBox>
);

View File

@ -457,7 +457,6 @@ const ListView = () => {
})}
action={
<Button
size="M"
variant="secondary"
startIcon={<AddIcon />}
onClick={() => (canCreate ? handleGoTo('create') : {})}