Is viewV2 to shared core
This commit is contained in:
parent
ffab29cdee
commit
db9cf128f0
|
@ -324,9 +324,7 @@ export async function update(
|
||||||
return pickApi(tableId).update(tableId, view)
|
return pickApi(tableId).update(tableId, view)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isV2(view: View | ViewV2): view is ViewV2 {
|
export const isV2 = helpers.views.isV2
|
||||||
return (view as ViewV2).version === 2
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function remove(viewId: string): Promise<ViewV2> {
|
export async function remove(viewId: string): Promise<ViewV2> {
|
||||||
const { tableId } = utils.extractViewInfoFromID(viewId)
|
const { tableId } = utils.extractViewInfoFromID(viewId)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import {
|
import {
|
||||||
BasicViewFieldMetadata,
|
BasicViewFieldMetadata,
|
||||||
|
View,
|
||||||
ViewCalculationFieldMetadata,
|
ViewCalculationFieldMetadata,
|
||||||
ViewFieldMetadata,
|
ViewFieldMetadata,
|
||||||
ViewV2,
|
ViewV2,
|
||||||
|
@ -43,3 +44,7 @@ export function basicFields(view: UnsavedViewV2, opts?: { visible?: boolean }) {
|
||||||
return !isCalculationField(field) && (!visible || isVisible(field))
|
return !isCalculationField(field) && (!visible || isVisible(field))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isV2(view: View | ViewV2): view is ViewV2 {
|
||||||
|
return (view as ViewV2).version === 2
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue