Browse Source

code scanner for forms - WIP

pull/5114/head
Daniel Spaude 2 years ago
parent
commit
663d8afddd
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 6
      packages/nc-gui/components/smartsheet/Form.vue

6
packages/nc-gui/components/smartsheet/Form.vue

@ -1,6 +1,6 @@
<script setup lang="ts">
import Draggable from 'vuedraggable'
import { RelationTypes, UITypes, ViewTypes, getSystemColumns, isVirtualCol } from 'nocodb-sdk'
import { RelationTypes, UITypes, ViewTypes, getSystemColumns, isVirtualCol, ColumnType } from 'nocodb-sdk'
import {
ActiveViewInj,
IsFormInj,
@ -361,6 +361,8 @@ function handleMouseUp(col: Record<string, any>, hiddenColIndex: number) {
}
}
const columnSupportsScanning = (elementType: UITypes) => [UITypes.SingleLineText].includes(elementType)
onClickOutside(draggableRef, () => {
activeRow.value = ''
})
@ -616,7 +618,7 @@ watch(view, (nextView) => {
/>
</div>
<a-form-item v-if="element.uidt === 'SingleLineText'" class="my-0 w-1/2 !mb-1">
<a-form-item v-if="columnSupportsScanning(element.uidt)" class="my-0 w-1/2 !mb-1">
<div class="flex gap-2 items-center">
<span
class="text-gray-500 mr-2 nc-form-input-required"

Loading…
Cancel
Save