Browse Source

QR code type: adress PR feedback

pull/4142/head
Daniel Spaude 2 years ago
parent
commit
28a905ac35
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 2
      packages/nc-gui/components/smartsheet/column/EditOrAdd.vue
  2. 11
      packages/nc-gui/components/smartsheet/column/QrCodeOptions.vue

2
packages/nc-gui/components/smartsheet/column/EditOrAdd.vue

@ -158,7 +158,7 @@ onMounted(() => {
</a-form-item>
<LazySmartsheetColumnFormulaOptions v-if="formState.uidt === UITypes.Formula" v-model:value="formState" />
<LazySmartsheetColumnQrCodeOptions v-if="formState.uidt === UITypes.QrCode" v-model:value="formState" />
<LazySmartsheetColumnQrCodeOptions v-if="formState.uidt === UITypes.QrCode" v-model="formState" />
<LazySmartsheetColumnCurrencyOptions v-if="formState.uidt === UITypes.Currency" v-model:value="formState" />
<LazySmartsheetColumnDurationOptions v-if="formState.uidt === UITypes.Duration" v-model:value="formState" />
<LazySmartsheetColumnRatingOptions v-if="formState.uidt === UITypes.Rating" v-model:value="formState" />

11
packages/nc-gui/components/smartsheet/column/QrCodeOptions.vue

@ -1,12 +1,12 @@
<script setup lang="ts">
import { UITypes } from 'nocodb-sdk'
import type { SelectProps } from 'ant-design-vue'
import { useVModel, onMounted } from '#imports'
import { useVModel } from '#imports'
const props = defineProps<{
value: any
modelValue: any
}>()
const emit = defineEmits(['update:value'])
const emit = defineEmits(['update:modelValue'])
const meta = inject(MetaInj, ref())
@ -16,7 +16,7 @@ const reloadDataHook = inject(ReloadViewDataHookInj)!
const { fields, metaColumnById } = useViewColumns(activeView, meta, () => reloadDataHook.trigger())
const vModel = useVModel(props, 'value', emit)
const vModel = useVModel(props, 'modelValue', emit)
const { setAdditionalValidations, validateInfos, column } = useColumnCreateStoreOrThrow()
@ -40,9 +40,8 @@ const columnsAllowedAsQrValue = computed<SelectProps['options']>(() => {
})
})
// set default value
onMounted(() => {
// set default value
vModel.value.fk_qr_value_column_id = (column?.value?.colOptions as Record<string, any>)?.fk_qr_value_column_id || ''
})

Loading…
Cancel
Save