mirror of
https://github.com/strapi/strapi.git
synced 2025-12-13 16:08:11 +00:00
Sort CT/ST in RBAC edit role
This commit is contained in:
parent
8245603a5d
commit
b17bc9c7a1
@ -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>
|
||||
);
|
||||
|
||||
@ -457,7 +457,6 @@ const ListView = () => {
|
||||
})}
|
||||
action={
|
||||
<Button
|
||||
size="M"
|
||||
variant="secondary"
|
||||
startIcon={<AddIcon />}
|
||||
onClick={() => (canCreate ? handleGoTo('create') : {})}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user