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 ContentTypes = ({ isFormDisabled, kind, layout: { actions, subjects } }) => {
|
||||||
|
const sortedSubjects = [...subjects].sort((a, b) => a.label > b.label);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledBox background="neutral0">
|
<StyledBox background="neutral0">
|
||||||
<GlobalActions actions={actions} kind={kind} isFormDisabled={isFormDisabled} />
|
<GlobalActions actions={actions} kind={kind} isFormDisabled={isFormDisabled} />
|
||||||
@ -17,7 +19,7 @@ const ContentTypes = ({ isFormDisabled, kind, layout: { actions, subjects } }) =
|
|||||||
actions={actions}
|
actions={actions}
|
||||||
isFormDisabled={isFormDisabled}
|
isFormDisabled={isFormDisabled}
|
||||||
pathToData={kind}
|
pathToData={kind}
|
||||||
subjects={subjects}
|
subjects={sortedSubjects}
|
||||||
/>
|
/>
|
||||||
</StyledBox>
|
</StyledBox>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -457,7 +457,6 @@ const ListView = () => {
|
|||||||
})}
|
})}
|
||||||
action={
|
action={
|
||||||
<Button
|
<Button
|
||||||
size="M"
|
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
startIcon={<AddIcon />}
|
startIcon={<AddIcon />}
|
||||||
onClick={() => (canCreate ? handleGoTo('create') : {})}
|
onClick={() => (canCreate ? handleGoTo('create') : {})}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user