Browse Source

Nc fix/resolve console warnings (#8715)

* fix(nc-gui): some ts warnings

* fix(nc-gui): columnFilter file warnings

* fix(nc-gui): fix ts errors

* fix(nc-gui): pr review changes

* fix(nc-gui): update NcCheckbox change event

* fix(nc-gui): pr review changes
pull/8742/head
Ramesh Mane 3 weeks ago committed by GitHub
parent
commit
f49bf52abf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nc-gui/components/dlg/ViewCreate.vue
  2. 4
      packages/nc-gui/components/nc/Checkbox.vue
  3. 8
      packages/nc-gui/components/shared-view/AskPassword.vue
  4. 4
      packages/nc-gui/components/smartsheet/Form.vue
  5. 1
      packages/nc-gui/components/smartsheet/Kanban.vue
  6. 2
      packages/nc-gui/components/smartsheet/expanded-form/Comments.vue
  7. 4
      packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue

4
packages/nc-gui/components/dlg/ViewCreate.vue

@ -13,7 +13,7 @@ interface Props {
groupingFieldColumnId?: string groupingFieldColumnId?: string
geoDataFieldColumnId?: string geoDataFieldColumnId?: string
tableId: string tableId: string
calendarRange: Array<{ calendarRange?: Array<{
fk_from_column_id: string fk_from_column_id: string
fk_to_column_id: string | null // for ee only fk_to_column_id: string | null // for ee only
}> }>
@ -36,7 +36,7 @@ interface Form {
// for calendar view only // for calendar view only
calendar_range: Array<{ calendar_range: Array<{
fk_from_column_id: string fk_from_column_id: string
fk_to_column_id: string | undefined // for ee only fk_to_column_id: string | null // for ee only
}> }>
} }

4
packages/nc-gui/components/nc/Checkbox.vue

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
interface Props { interface Props {
checked: boolean checked?: boolean
size?: 'small' | 'default' | 'large' size?: 'small' | 'default' | 'large'
disabled?: boolean disabled?: boolean
} }
@ -15,7 +15,7 @@ const emit = defineEmits(['change', 'update:checked'])
const checked = useVModel(props, 'checked', emit) const checked = useVModel(props, 'checked', emit)
const onChange = (e: Event) => { const onChange = (e: Event) => {
emit('change', e, checked.value) emit('change', e, (e.target as HTMLInputElement).checked)
} }
</script> </script>

8
packages/nc-gui/components/shared-view/AskPassword.vue

@ -44,13 +44,6 @@ const focus: VNodeRef = (el: typeof InputPassword) => {
return el && el?.focus?.() return el && el?.focus?.()
} }
watch(
() => formState.value.password,
() => {
passwordError.value = null
},
)
const bgImageName = computed(() => { const bgImageName = computed(() => {
switch (props.viewType) { switch (props.viewType) {
case ViewTypes.GRID: case ViewTypes.GRID:
@ -97,6 +90,7 @@ const bgImageName = computed(() => {
class="!rounded-lg !text-small" class="!rounded-lg !text-small"
hide-details hide-details
:placeholder="$t('msg.enterPassword')" :placeholder="$t('msg.enterPassword')"
@input="passwordError = null"
/> />
<Transition name="layout"> <Transition name="layout">
<div v-if="passwordError" class="mb-2 text-sm text-red-500">{{ passwordError }}</div> <div v-if="passwordError" class="mb-2 text-sm text-red-500">{{ passwordError }}</div>

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

@ -969,7 +969,7 @@ useEventListener(
:bordered="false" :bordered="false"
:data-testid="NcForm.heading" :data-testid="NcForm.heading"
:data-title="NcForm.heading" :data-title="NcForm.heading"
@update:value="updateView" @input="updateView"
@focus="activeRow = NcForm.heading" @focus="activeRow = NcForm.heading"
@blur="activeRow = ''" @blur="activeRow = ''"
/> />
@ -1280,7 +1280,7 @@ useEventListener(
:placeholder="$t('msg.info.formInput')" :placeholder="$t('msg.info.formInput')"
@focus="onFocusActiveFieldLabel" @focus="onFocusActiveFieldLabel"
@keydown.enter.prevent @keydown.enter.prevent
@update:value="updateFieldTitle" @input="updateFieldTitle($event.target.value)"
@change="updateColMeta(activeField)" @change="updateColMeta(activeField)"
/> />

1
packages/nc-gui/components/smartsheet/Kanban.vue

@ -113,7 +113,6 @@ const kanbanContainerRef = ref()
const selectedStackTitle = ref('') const selectedStackTitle = ref('')
reloadViewDataHook?.on(async () => { reloadViewDataHook?.on(async () => {
console.log('load')
await loadKanbanMeta() await loadKanbanMeta()
await loadKanbanData() await loadKanbanData()
}) })

2
packages/nc-gui/components/smartsheet/expanded-form/Comments.vue

@ -3,7 +3,7 @@ import { type CommentType, ProjectRoles } from 'nocodb-sdk'
const props = defineProps<{ const props = defineProps<{
loading: boolean loading: boolean
primaryKey: string primaryKey: string | null
}>() }>()
const { const {

4
packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue

@ -878,7 +878,7 @@ const changeToDynamic = async (filter, i) => {
'mt-1 mb-2': filters.length, 'mt-1 mb-2': filters.length,
}" }"
> >
<NcButton :ref="addFilterBtnRef" size="small" type="text" class="nc-btn-focus" @click.stop="addFilter()"> <NcButton size="small" type="text" class="nc-btn-focus" @click.stop="addFilter()">
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<component :is="iconMap.plus" /> <component :is="iconMap.plus" />
<!-- Add Filter --> <!-- Add Filter -->
@ -904,7 +904,7 @@ const changeToDynamic = async (filter, i) => {
'mt-1 mb-2': filters.length, 'mt-1 mb-2': filters.length,
}" }"
> >
<NcButton :ref="addFilterBtnRef" class="nc-btn-focus" size="small" type="text" @click.stop="addFilter()"> <NcButton class="nc-btn-focus" size="small" type="text" @click.stop="addFilter()">
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<component :is="iconMap.plus" /> <component :is="iconMap.plus" />
<!-- Add Filter --> <!-- Add Filter -->

Loading…
Cancel
Save