Sort entry observation options
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
cde41ab337
commit
28790705ea
|
@ -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(() => {
|
|||
<template>
|
||||
<FetchData
|
||||
url="ObservationTypes"
|
||||
@on-fetch="(data) => (entryObservationsOptions = data)"
|
||||
@on-fetch="(data) => sortEntryObservationOptions(data)"
|
||||
auto-load
|
||||
/>
|
||||
<CrudModel
|
||||
|
|
Loading…
Reference in New Issue