From 5efcee12a902815ae96f2ecd5ad9146d236295d0 Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Thu, 3 Aug 2023 20:18:43 +0200 Subject: [PATCH] frontend: sort by title --- frontend/zetikettes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/zetikettes.js b/frontend/zetikettes.js index fa8fc5e..25c97ab 100644 --- a/frontend/zetikettes.js +++ b/frontend/zetikettes.js @@ -82,7 +82,7 @@ $(document).ready(async () => { url: backend_api + 'list', timeout: 1000, }); - loadAll(resp.tikettes); + loadAll(resp.tikettes.sort((a, b) => (a.title < b.title) ? -1 : 1)); } catch(e) { const appbody = $("#appbody"); appbody.append(`
  • Could not reach backend server`);