Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

chore: lint

Ramesh Mane75553e32f561
diff --git a/packages/nc-gui/components/smartsheet/Gallery.vue b/packages/nc-gui/components/smartsheet/Gallery.vue
index bbe47062c6..e32ab572c1 100644
--- a/packages/nc-gui/components/smartsheet/Gallery.vue
+++ b/packages/nc-gui/components/smartsheet/Gallery.vue
@@ -27,8 +27,6 @@ const expandedFormDlg = ref(false)
const expandedFormRow = ref<RowType>()
const expandedFormRowState = ref<Record<string, any>>()
-const colorRenderTrigger = ref(0)
-
provide(IsFormInj, ref(false))
provide(IsGalleryInj, ref(true))
provide(IsGridInj, ref(false))
@@ -260,7 +258,6 @@ const {
const getCellColorStyle = (record: Row, columnId: string) => {
// Access pre-computed cell colors from rowMeta (optimized - no function calls)
- colorRenderTrigger.value // Force re-evaluation when colors change
const cellColorInfo = record.rowMeta?.cellColors?.[columnId]
if (!cellColorInfo) return {}
@@ -273,7 +270,6 @@ const getCellColorStyle = (record: Row, columnId: string) => {
const getCellLeftBorderStyle = (record: Row, columnId: string) => {
// Access pre-computed cell colors from rowMeta (optimized - no function calls)
- colorRenderTrigger.value // Force re-evaluation when colors change
const cellColorInfo = record.rowMeta?.cellColors?.[columnId]
if (!cellColorInfo || cellColorInfo.is_set_as_background || !cellColorInfo.cellLeftBorderColor) return null
@@ -424,9 +420,6 @@ reloadViewDataHook?.on(reloadViewDataListener)
const smartsheetEventHandler = (event: SmartsheetStoreEvents) => {
if (event === SmartsheetStoreEvents.DATA_RELOAD) {
reloadViewDataHook?.trigger()
- } else if ([SmartsheetStoreEvents.TRIGGER_RE_RENDER, SmartsheetStoreEvents.ON_ROW_COLOUR_INFO_UPDATE].includes(event)) {
- // Trigger view update when row coloring changes by incrementing the render trigger
- colorRenderTrigger.value++
}
}
diff --git a/packages/nc-gui/components/smartsheet/Kanban.vue b/packages/nc-gui/components/smartsheet/Kanban.vue
index 4181282374..4898786f91 100644
--- a/packages/nc-gui/components/smartsheet/Kanban.vue
+++ b/packages/nc-gui/components/smartsheet/Kanban.vue
@@ -130,11 +130,8 @@ const {
getCellLeftBorderStyle: _getCellLeftBorderStyle,
} = useViewRowColorRender()
-const colorRenderTrigger = ref(0)
-
const getCellColorStyle = (record: Row, columnId: string) => {
// Access pre-computed cell colors from rowMeta (optimized - no function calls)
- colorRenderTrigger.value // Force re-evaluation when colors change
const cellColorInfo = record.rowMeta?.cellColors?.[columnId]
if (!cellColorInfo) return {}
@@ -147,7 +144,6 @@ const getCellColorStyle = (record: Row, columnId: string) => {
const getCellLeftBorderStyle = (record: Row, columnId: string) => {
// Access pre-computed cell colors from rowMeta (optimized - no function calls)
- colorRenderTrigger.value // Force re-evaluation when colors change
const cellColorInfo = record.rowMeta?.cellColors?.[columnId]
if (!cellColorInfo || cellColorInfo.is_set_as_background || !cellColorInfo.cellLeftBorderColor) return null
@@ -177,9 +173,6 @@ reloadViewDataHook?.on(reloadViewDataListener)
const smartsheetEventHandler = (event: SmartsheetStoreEvents) => {
if (event === SmartsheetStoreEvents.DATA_RELOAD) {
reloadViewDataHook?.trigger()
- } else if ([SmartsheetStoreEvents.TRIGGER_RE_RENDER, SmartsheetStoreEvents.ON_ROW_COLOUR_INFO_UPDATE].includes(event)) {
- // Trigger view update when row coloring changes by incrementing the render trigger
- colorRenderTrigger.value++
}
}
@@ -1051,7 +1044,10 @@ const resetPointerEvent = (record: RowType, col: ColumnType) => {
:style="getCellLeftBorderStyle(record, col.id)"
></div>
<div class="flex flex-col w-full">
- <div v-if="isActiveViewFieldHeaderVisible" class="flex flex-row w-full justify-start">
+ <div
+ v-if="isActiveViewFieldHeaderVisible"
+ class="flex flex-row w-full justify-start"
+ >
<div class="nc-card-col-header w-full !children:text-nc-content-gray-muted">
<LazySmartsheetHeaderVirtualCell
v-if="isVirtualCol(col)"
diff --git a/packages/nc-gui/components/smartsheet/KanbanOptimized.vue b/packages/nc-gui/components/smartsheet/KanbanOptimized.vue
index 8c8fad1f0c..73c37f9523 100644
--- a/packages/nc-gui/components/smartsheet/KanbanOptimized.vue
+++ b/packages/nc-gui/components/smartsheet/KanbanOptimized.vue
@@ -130,11 +130,8 @@ const {
getCellLeftBorderStyle: _getCellLeftBorderStyle,
} = useViewRowColorRender()
-const colorRenderTrigger = ref(0)
-
const getCellColorStyle = (record: Row, columnId: string) => {
// Access pre-computed cell colors from rowMeta (optimized - no function calls)
- colorRenderTrigger.value // Force re-evaluation when colors change
const cellColorInfo = record.rowMeta?.cellColors?.[columnId]
if (!cellColorInfo) return {}
@@ -147,7 +144,6 @@ const getCellColorStyle = (record: Row, columnId: string) => {
const getCellLeftBorderStyle = (record: Row, columnId: string) => {
// Access pre-computed cell colors from rowMeta (optimized - no function calls)
- colorRenderTrigger.value // Force re-evaluation when colors change
const cellColorInfo = record.rowMeta?.cellColors?.[columnId]
if (!cellColorInfo || cellColorInfo.is_set_as_background || !cellColorInfo.cellLeftBorderColor) return null
@@ -288,9 +284,6 @@ reloadViewDataHook?.on(reloadViewDataListener)
const smartsheetEventHandler = (event: SmartsheetStoreEvents) => {
if (event === SmartsheetStoreEvents.DATA_RELOAD) {
reloadViewDataHook?.trigger()
- } else if ([SmartsheetStoreEvents.TRIGGER_RE_RENDER, SmartsheetStoreEvents.ON_ROW_COLOUR_INFO_UPDATE].includes(event)) {
- // Trigger view update when row coloring changes by incrementing the render trigger
- colorRenderTrigger.value++
}
}
@@ -1790,7 +1783,10 @@ const resetPointerEvent = (record: RowType, col: ColumnType) => {
:style="getCellLeftBorderStyle(record, col.id)"
></div>
<div class="flex flex-col w-full">
- <div v-if="isActiveViewFieldHeaderVisible" class="flex flex-row w-full justify-start">
+ <div
+ v-if="isActiveViewFieldHeaderVisible"
+ class="flex flex-row w-full justify-start"
+ >
<div class="nc-card-col-header w-full !children:text-nc-content-gray-muted">
<LazySmartsheetHeaderVirtualCell
v-if="isVirtualCol(col)"
diff --git a/packages/nc-gui/composables/useNocoAi.ts b/packages/nc-gui/composables/useNocoAi.ts
index 94144c62cd..7af9f29f92 100644
--- a/packages/nc-gui/composables/useNocoAi.ts
+++ b/packages/nc-gui/composables/useNocoAi.ts
@@ -334,13 +334,14 @@ export const useNocoAi = createSharedComposable(() => {
return {
action: (res?.action as 'add' | 'replace' | 'clear') || 'add',
- filters: (res?.filters as {
- column: string
- comparison_op: string
- comparison_sub_op: string | null
- value: string | null
- logical_op: string
- }[]) || [],
+ filters:
+ (res?.filters as {
+ column: string
+ comparison_op: string
+ comparison_sub_op: string | null
+ value: string | null
+ logical_op: string
+ }[]) || [],
}
}
diff --git a/packages/nc-gui/composables/useViewFilters.ts b/packages/nc-gui/composables/useViewFilters.ts
index 1c7c31cde2..e60d13a6a2 100644
--- a/packages/nc-gui/composables/useViewFilters.ts
+++ b/packages/nc-gui/composables/useViewFilters.ts
@@ -963,10 +963,10 @@ export function useViewFilters(
filters.value.push(
(draftFilter?.fk_column_id
- // Strip only 'order' from the draft so it gets a fresh order from placeholderFilter.
- // Preserve 'logical_op' from the draft when provided (e.g. AI-generated filters may use 'or'),
- // otherwise normalizeFilterNode falls back to placeholderFilter's default.
- ? { ...placeholderFilter(), ...normalizeFilterNode(draftFilter, ['order']) }
+ ? // Strip only 'order' from the draft so it gets a fresh order from placeholderFilter.
+ // Preserve 'logical_op' from the draft when provided (e.g. AI-generated filters may use 'or'),
+ // otherwise normalizeFilterNode falls back to placeholderFilter's default.
+ { ...placeholderFilter(), ...normalizeFilterNode(draftFilter, ['order']) }
: placeholderFilter()) as ColumnFilterType,
)
if (!undo && !(isForm.value && !isWebhook)) {
diff --git a/packages/nc-gui/utils/dataUtils.ts b/packages/nc-gui/utils/dataUtils.ts
index 4e8ae6ad71..2743f4fa0d 100644
--- a/packages/nc-gui/utils/dataUtils.ts
+++ b/packages/nc-gui/utils/dataUtils.ts
@@ -449,9 +449,9 @@ export const getLookupValue = (modelValue: string | null | number | Array<any>,
}
// when childColumn not found (external base or nested links, simply return the modelValue
- if (!childColumn){
- if(typeof modelValue === 'string') {
- return modelValue;
+ if (!childColumn) {
+ if (typeof modelValue === 'string') {
+ return modelValue
} else {
return modelValue?.toString() ?? ''
}