From 28790705ea4899d3d816cecbf31589c468ec64db Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 5 Feb 2024 12:04:28 -0300 Subject: [PATCH] Sort entry observation options --- src/pages/Entry/Card/EntryNotes.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/Entry/Card/EntryNotes.vue b/src/pages/Entry/Card/EntryNotes.vue index 68be22633..f56e59253 100644 --- a/src/pages/Entry/Card/EntryNotes.vue +++ b/src/pages/Entry/Card/EntryNotes.vue @@ -15,6 +15,12 @@ const { t } = useI18n(); const entryObservationsRef = ref(null); const entryObservationsOptions = ref([]); +const sortEntryObservationOptions = (data) => { + entryObservationsOptions.value = [...data].sort((a, b) => + a.description.localeCompare(b.description) + ); +}; + onMounted(() => { if (entryObservationsRef.value) entryObservationsRef.value.reload(); }); @@ -22,7 +28,7 @@ onMounted(() => {