From 2665d477adbf19139b11adedc3232e083aeb805a Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Mon, 17 Jul 2023 11:24:02 +0200 Subject: [PATCH] :sparkles: Sort rules --- src/front/Components/Layouts/Roles/RolesInformations/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/front/Components/Layouts/Roles/RolesInformations/index.tsx b/src/front/Components/Layouts/Roles/RolesInformations/index.tsx index eafa2e48..a6bab20f 100644 --- a/src/front/Components/Layouts/Roles/RolesInformations/index.tsx +++ b/src/front/Components/Layouts/Roles/RolesInformations/index.tsx @@ -42,6 +42,7 @@ export default function RolesInformations(props: IProps) { } return { ...rule, checked: false }; }) + .sort((ruleA, ruleB) => (ruleA.name < ruleB.name ? 1 : -1)) .sort((rule) => (rule.checked ? -1 : 1)); setRulesCheckboxes(rulesCheckboxes); }