Browse Source

chore(gui): lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3977/head
Pranav C 2 years ago
parent
commit
81d191406d
  1. 3
      packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue
  2. 1
      packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue
  3. 2
      packages/nc-gui/components/smartsheet/toolbar/SortListMenu.vue
  4. 2
      packages/nc-gui/composables/useGridViewColumnWidth.ts
  5. 14
      packages/nc-gui/composables/useViewColumns.ts

3
packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue

@ -85,8 +85,7 @@ const filterAutoSaveLoc = computed({
@update:filters-length="filtersLength = $event" @update:filters-length="filtersLength = $event"
> >
<div v-if="!isPublic" class="flex items-end mt-2 min-h-[30px]" @click.stop> <div v-if="!isPublic" class="flex items-end mt-2 min-h-[30px]" @click.stop>
<a-checkbox id="col-filter-checkbox" v-model:checked="filterAutoSaveLoc" class="col-filter-checkbox" <a-checkbox id="col-filter-checkbox" v-model:checked="filterAutoSaveLoc" class="col-filter-checkbox" hide-details dense>
hide-details dense>
<span class="text-grey text-xs"> <span class="text-grey text-xs">
{{ $t('msg.info.filterAutoApply') }} {{ $t('msg.info.filterAutoApply') }}
<!-- Auto apply --> <!-- Auto apply -->

1
packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

@ -39,7 +39,6 @@ const {
showSystemFields, showSystemFields,
sortedAndFilteredFields, sortedAndFilteredFields,
fields, fields,
loadViewColumns,
filteredFieldList, filteredFieldList,
filterQuery, filterQuery,
showAll, showAll,

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

@ -33,7 +33,7 @@ const columnByID = computed(() =>
watch( watch(
() => view.value?.id, () => view.value?.id,
(viewId) => { (viewId) => {
if(viewId)loadSorts() if (viewId) loadSorts()
}, },
{ immediate: true }, { immediate: true },
) )

2
packages/nc-gui/composables/useGridViewColumnWidth.ts

@ -52,7 +52,7 @@ export function useGridViewColumnWidth(view: Ref<GridType | undefined>) {
/** when columns changes(create/delete) reload grid columns /** when columns changes(create/delete) reload grid columns
* or when view changes reload columns width */ * or when view changes reload columns width */
watch([() => columns.value?.length, () => view?.value?.id ], loadGridViewColumns) watch([() => columns.value?.length, () => view?.value?.id], loadGridViewColumns)
const updateWidth = async (id: string, width: string) => { const updateWidth = async (id: string, width: string) => {
if (gridViewCols?.value?.[id]) { if (gridViewCols?.value?.[id]) {

14
packages/nc-gui/composables/useViewColumns.ts

@ -206,11 +206,15 @@ export function useViewColumns(
}) })
// reload view columns when table meta changes // reload view columns when table meta changes
watch(() => view?.value?.id, async (newVal) => { watch(
if (newVal) { () => view?.value?.id,
await loadViewColumns() async (newVal) => {
} if (newVal) {
}, { immediate: true }) await loadViewColumns()
}
},
{ immediate: true },
)
return { return {
fields, fields,

Loading…
Cancel
Save