mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 13:36:52 +00:00
fix(nc-gui): view data reload issue after view config copy
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { type RowColoringInfo, ViewTypes } from 'nocodb-sdk'
|
||||
import { type RowColoringInfo, ViewSettingOverrideOptions, ViewTypes } from 'nocodb-sdk'
|
||||
import { iconMap } from './iconUtils'
|
||||
import type { Language } from '~/lib/types'
|
||||
import UsersIcon from '~icons/nc-icons/users'
|
||||
@@ -79,3 +79,20 @@ export const getDefaultViewMetas = (viewType: ViewTypes) => {
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
export const validateViewConfigOverrideEvent = (
|
||||
event: SmartsheetStoreEvents | string,
|
||||
optionToValidate: ViewSettingOverrideOptions,
|
||||
params?: { viewId: string; copiedOptions: ViewSettingOverrideOptions[] },
|
||||
) => {
|
||||
if (
|
||||
event !== SmartsheetStoreEvents.COPIED_VIEW_CONFIG ||
|
||||
!optionToValidate ||
|
||||
!ncIsObject(params) ||
|
||||
!ncIsArray(params?.copiedOptions)
|
||||
) {
|
||||
return false
|
||||
}
|
||||
|
||||
return params.copiedOptions.includes(optionToValidate)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user