Skip to content

Commit

Permalink
add function of automatically convert to lowercase of local ID
Browse files Browse the repository at this point in the history
  • Loading branch information
pjjin-design committed Jan 8, 2025
1 parent 0a0f77b commit d99efdc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/DatasetEditorForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
</v-col>
</v-row>
<v-row dense>
<v-col cols="12">
<v-text-field label="Local ID" type="string" v-model="localID" @input="updateIdentifierFromLocalID" variant="outlined" clearable :disabled="isEditing"></v-text-field>
<v-col cols="6">
<v-text-field label="Local ID" type="string" v-model="localID" @input="updateIdentifierFromLocalID" variant="outlined" @update:modelValue="convertToLowercaseLocalID" clearable :disabled="isEditing"></v-text-field>
</v-col>
</v-row>
<v-row dense>
Expand Down Expand Up @@ -1035,6 +1035,11 @@ export default defineComponent({
model.value.identification.centreID = value.toLowerCase();
};
const convertToLowercaseLocalID = (value) => {
localID.value = value.toLowerCase();
};
// Has the user filled the dialog window?
const initialDialogFilled = computed(() => {
return model.value.identification.centreID && selectedTemplate.value;
Expand Down Expand Up @@ -2361,7 +2366,8 @@ export default defineComponent({
updateIdentifierFromLocalID,
extractLocalID,
localID,
isEditing
isEditing,
convertToLowercaseLocalID
}
}
});
Expand Down

0 comments on commit d99efdc

Please sign in to comment.