diff --git a/packages/nc-gui-v2/components/smartsheet-toolbar/FieldsMenu.vue b/packages/nc-gui-v2/components/smartsheet-toolbar/FieldsMenu.vue index ff00f5e285..c44528bfb9 100644 --- a/packages/nc-gui-v2/components/smartsheet-toolbar/FieldsMenu.vue +++ b/packages/nc-gui-v2/components/smartsheet-toolbar/FieldsMenu.vue @@ -364,8 +364,8 @@ export default { - - - - + --> + + diff --git a/packages/nc-gui-v2/composables/useViewColumns.ts b/packages/nc-gui-v2/composables/useViewColumns.ts index f27cd0eea2..ddb1c0cb02 100644 --- a/packages/nc-gui-v2/composables/useViewColumns.ts +++ b/packages/nc-gui-v2/composables/useViewColumns.ts @@ -1,4 +1,4 @@ -import { isSystemColumn } from "nocodb-sdk"; +import { isSystemColumn } from 'nocodb-sdk' import type { ColumnType, FormType, GalleryType, GridType, TableType } from 'nocodb-sdk' import type { Ref } from 'vue' import { useNuxtApp } from '#app' @@ -20,7 +20,6 @@ export default function ( const filterQuery = ref('') - const { $api } = useNuxtApp() const loadViewColumns = async () => { @@ -99,9 +98,8 @@ export default function ( const filteredFieldList = computed(() => { return fields.value?.filter((field) => { - // hide system columns if not enabled - if(!showSystemFields.value && isSystemColumn(metaColumnById?.value?.[field.fk_column_id as string])) { + if (!showSystemFields.value && isSystemColumn(metaColumnById?.value?.[field.fk_column_id as string])) { return false } @@ -109,12 +107,11 @@ export default function ( }) }) - const sortedAndFilteredFields = computed(() => { return (fields?.value ?.filter((c) => { // hide system columns if not enabled - if(!showSystemFields.value && isSystemColumn(metaColumnById?.value?.[c.fk_column_id as string])) { + if (!showSystemFields.value && isSystemColumn(metaColumnById?.value?.[c.fk_column_id as string])) { return false } return c.show @@ -123,7 +120,6 @@ export default function ( ?.map((c) => metaColumnById?.value?.[c.fk_column_id as string]) || []) as ColumnType[] }) - return { fields, loadViewColumns,