Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
TeodoraPavlova committed May 7, 2024
1 parent a7af940 commit 0df05ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions frontend/src/components/Entity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ async function getEntity() {
}
}
async function onUpdate(entity) {
if (entity) {
entity.value = entity;
async function onUpdate(editEntity) {
if (editEntity) {
entity.value = editEntity;
}
}
Expand Down
14 changes: 8 additions & 6 deletions frontend/src/components/Schema.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,18 @@ onUpdated(() => {
}
});
async function onSchemaUpdate() {
await getSchema();
function init() {
loading.value = true;
getSchema().then(() => loading.value = false);
}
function onSchemaUpdate() {
init();
}
watch(
route,
() => {
loading.value = true;
getSchema().then(() => loading.value = false);
},
() => init(),
{
immediate: true
}
Expand Down

0 comments on commit 0df05ef

Please sign in to comment.