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 2 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
geoDataFieldColumnId?: string
tableId: string
calendarRange: Array<{
calendarRange?: Array<{
fk_from_column_id: string
fk_to_column_id: string | null // for ee only
}>
@ -36,7 +36,7 @@ interface Form {
// for calendar view only
calendar_range: Array<{
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>
interface Props {
checked: boolean
checked?: boolean
size?: 'small' | 'default' | 'large'
disabled?: boolean
}
@ -15,7 +15,7 @@ const emit = defineEmits(['change', 'update:checked'])
const checked = useVModel(props, 'checked', emit)
const onChange = (e: Event) => {
emit('change', e, checked.value)
emit('change', e, (e.target as HTMLInputElement).checked)
}
</script>

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

@ -44,13 +44,6 @@ const focus: VNodeRef = (el: typeof InputPassword) => {
return el && el?.focus?.()
}
watch(
() => formState.value.password,
() => {
passwordError.value = null
},
)
const bgImageName = computed(() => {
switch (props.viewType) {
case ViewTypes.GRID:
@ -97,6 +90,7 @@ const bgImageName = computed(() => {
class="!rounded-lg !text-small"
hide-details
:placeholder="$t('msg.enterPassword')"
@input="passwordError = null"
/>
<Transition name="layout">
<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"
:data-testid="NcForm.heading"
:data-title="NcForm.heading"
@update:value="updateView"
@input="updateView"
@focus="activeRow = NcForm.heading"
@blur="activeRow = ''"
/>
@ -1280,7 +1280,7 @@ useEventListener(
:placeholder="$t('msg.info.formInput')"
@focus="onFocusActiveFieldLabel"
@keydown.enter.prevent
@update:value="updateFieldTitle"
@input="updateFieldTitle($event.target.value)"
@change="updateColMeta(activeField)"
/>

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

@ -113,7 +113,6 @@ const kanbanContainerRef = ref()
const selectedStackTitle = ref('')
reloadViewDataHook?.on(async () => {
console.log('load')
await loadKanbanMeta()
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<{
loading: boolean
primaryKey: string
primaryKey: string | null
}>()
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,
}"
>
<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">
<component :is="iconMap.plus" />
<!-- Add Filter -->
@ -904,7 +904,7 @@ const changeToDynamic = async (filter, i) => {
'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">
<component :is="iconMap.plus" />
<!-- Add Filter -->

Loading…
Cancel
Save