From afb1eb86314db7019f7ca5813afcaee884e81536 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 15 Jul 2024 15:40:51 -0700 Subject: [PATCH] fixup! New: Use natural sorting for lists of items in the UI --- .../src/Settings/Profiles/Quality/QualityProfileFormatItems.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/Settings/Profiles/Quality/QualityProfileFormatItems.js b/frontend/src/Settings/Profiles/Quality/QualityProfileFormatItems.js index 7b90dec6c..61cbefba1 100644 --- a/frontend/src/Settings/Profiles/Quality/QualityProfileFormatItems.js +++ b/frontend/src/Settings/Profiles/Quality/QualityProfileFormatItems.js @@ -20,7 +20,8 @@ function calcOrder(profileFormatItems) { if (b.score !== a.score) { return b.score - a.score; } - return a.name > b.name ? 1 : -1; + + return a.localeCompare(b.name, undefined, { numeric: true }); }).map((x) => items[x.format]); }