Skip to content

Commit

Permalink
fix: supply resource and adminUser props for custom components set it…
Browse files Browse the repository at this point in the history
… column.componetns.edit/column.components.create
  • Loading branch information
ivictbor committed Feb 1, 2025
1 parent 42e61d3 commit 6274ae9
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions adminforth/spa/src/components/ColumnValueInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
@update:value="$emit('update:modelValue', $event)"
:meta="column.components[props.source].meta"
:record="currentValues"
:resource="coreStore.resource"
:adminUser="coreStore.adminUser"
@update:inValidity="$emit('update:inValidity', $event)"
@update:emptiness="$emit('update:emptiness', $event)"
/>
Expand Down Expand Up @@ -135,20 +137,29 @@
import { ref } from 'vue';
import { getCustomComponent } from '@/utils';
import { useI18n } from 'vue-i18n';
import { useCoreStore } from '@/stores/core';
const coreStore = useCoreStore();
const { t } = useI18n();
const props = defineProps<{
source: 'create' | 'edit',
column: any,
type: string,
value: any,
currentValues: any,
mode: string,
columnOptions: any,
unmasked: any,
deletable: boolean,
}>();
const props = withDefaults(
defineProps<{
source: 'create' | 'edit',
column: any,
type?: string,
value: any,
currentValues: any,
mode: string,
columnOptions: any,
unmasked: any,
deletable?: boolean,
}>(),
{
type: undefined,
deletable: false,
}
);
const input = ref(null);
Expand Down

0 comments on commit 6274ae9

Please sign in to comment.