made ModelEditor setupState function properly handle async requests

This commit is contained in:
vabene1111
2024-10-05 07:51:48 +02:00
parent 4ab0fbf36b
commit e4a6bd0a1f
14 changed files with 54 additions and 57 deletions

View File

@@ -49,11 +49,10 @@ const {setupState, deleteObject, saveObject, isUpdate, editingObjName, loading,
onMounted(() => {
if (!setupState(props.item, props.itemId)) {
// functions to populate defaults
setupState(props.item, props.itemId, () => {
editingObj.value.expires = DateTime.now().plus({year: 1}).toJSDate()
editingObj.value.scope = 'read write'
}
})
})
</script>