Skip to content

Commit

Permalink
nit #209
Browse files Browse the repository at this point in the history
  • Loading branch information
chrabyrd committed Feb 24, 2025
1 parent 7f46264 commit 140e3d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import type {
DataComponentMode,
} from "@/arches_lingo/types.ts";
defineOptions({
componentName: "SchemeLabel",
});
const props = defineProps<{
mode: DataComponentMode;
tileId?: string | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type { FormSubmitEvent } from "@primevue/forms";
const props = defineProps<{
isEditorMaximized: boolean;
component: Component;
componentName: string;
graphSlug: string;
nodeGroupAlias: string;
resourceInstanceId: string | undefined;
Expand Down Expand Up @@ -71,8 +72,7 @@ async function save(e: FormSubmitEvent) {
);
}
// @ts-expect-error componentName is declared via defineOptions
forceSectionRefresh!(props.component.componentName);
forceSectionRefresh!(props.componentName);
} catch (error) {
console.error(error);
}
Expand Down
12 changes: 5 additions & 7 deletions arches_lingo/src/arches_lingo/pages/SchemePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const resourceInstanceId = computed<string | undefined>(() => {
const componentData = ref([
{
component: markRaw(SchemeLabel),
componentName: "SchemeLabel",
name: $gettext("Scheme Label"),
graphSlug: "scheme",
nodeGroupAlias: "appellative_status",
Expand All @@ -65,7 +66,7 @@ function openEditor(componentName: string, tileId?: string) {
selectedComponentDatum.value = componentData.value.find(
(componentDatum) => {
return componentDatum.component.componentName === componentName;
return componentDatum.componentName === componentName;
},
);
Expand All @@ -83,7 +84,7 @@ function minimizeEditor() {
function forceSectionRefresh(componentName: string) {
const componentDatum = componentData.value.find((componentDatum) => {
return componentDatum.component.componentName === componentName;
return componentDatum.componentName === componentName;
});
if (componentDatum) {
Expand All @@ -101,11 +102,7 @@ function forceSectionRefresh(componentName: string) {
<component
:is="componentDatum.component"
v-for="componentDatum in componentData"
:key="
componentDatum.component.componentName +
'-' +
componentDatum.key
"
:key="componentDatum.componentName + '-' + componentDatum.key"
:graph-slug="componentDatum.graphSlug"
:node-group-alias="componentDatum.nodeGroupAlias"
:resource-instance-id="resourceInstanceId"
Expand All @@ -121,6 +118,7 @@ function forceSectionRefresh(componentName: string) {
<SchemeEditor
:is-editor-maximized="editorState === MAXIMIZED"
:component="selectedComponentDatum.component"
:component-name="selectedComponentDatum.componentName"
:graph-slug="selectedComponentDatum.graphSlug"
:node-group-alias="selectedComponentDatum.nodeGroupAlias"
:resource-instance-id="resourceInstanceId"
Expand Down

0 comments on commit 140e3d5

Please sign in to comment.