Browse Source

chore(nc-gui): resolve PR comments

pull/4574/head
Wing-Kam Wong 2 years ago
parent
commit
424d23f2cb
  1. 2
      packages/nc-gui/components/cell/TextArea.vue
  2. 2
      packages/nc-gui/components/smartsheet/Grid.vue
  3. 4
      packages/nc-gui/components/smartsheet/toolbar/SortListMenu.vue
  4. 2
      packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue

2
packages/nc-gui/components/cell/TextArea.vue

@ -3,7 +3,7 @@ import type { VNodeRef } from '@vue/runtime-core'
import { EditModeInj, inject, useVModel } from '#imports'
const props = defineProps<{
modelValue?: string | number | string[]
modelValue?: string | number
}>()
const emits = defineEmits(['update:modelValue'])

2
packages/nc-gui/components/smartsheet/Grid.vue

@ -298,7 +298,7 @@ function scrollToCell(row?: number | null, col?: number | null) {
row = row ?? selectedCell.row
col = col ?? selectedCell.col
if (row && col) {
if (row !== undefined && col !== undefined && row !== null && col !== null) {
// get active cell
const rows = tbodyEl.value?.querySelectorAll('tr')
const cols = rows?.[row].querySelectorAll('td')

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

@ -40,7 +40,7 @@ const columnByID = computed(() =>
}, {} as Record<string, ColumnType>),
)
const getColumnByID = (key?: string) => {
const getColumnUidtByID = (key?: string) => {
if (!key) return ''
return columnByID.value[key]?.uidt || ''
}
@ -100,7 +100,7 @@ useMenuCloseOnEsc(open)
@select="saveOrUpdate(sort, i)"
>
<a-select-option
v-for="(option, j) of getSortDirectionOptions(getColumnByID(sort.fk_column_id))"
v-for="(option, j) of getSortDirectionOptions(getColumnUidtByID(sort.fk_column_id))"
:key="j"
:value="option.value"
>

2
packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue

@ -48,7 +48,7 @@ const { isUIAllowed } = useUIPermission()
const { isSharedBase } = useProject()
const Icon = $computed(() => {
const Icon = computed(() => {
switch (selectedView.value?.lock_type) {
case LockType.Personal:
return MdiAccountIcon

Loading…
Cancel
Save