From 6ed44724410740f48799e66194c59bdf03ef3a79 Mon Sep 17 00:00:00 2001 From: Mark Titorenkov Date: Wed, 26 Jun 2024 17:51:30 +0300 Subject: [PATCH] Fix: Sort truenas pools by name (#3669) --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- src/widgets/truenas/component.jsx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/widgets/truenas/component.jsx b/src/widgets/truenas/component.jsx index 10d45bf61..4c8e77f49 100644 --- a/src/widgets/truenas/component.jsx +++ b/src/widgets/truenas/component.jsx @@ -39,17 +39,19 @@ export default function Component({ service }) { {enablePools && - poolsData.map((pool) => ( - - ))} + poolsData + .sort((a, b) => a.name.localeCompare(b.name)) + .map((pool) => ( + + ))} ); }