MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / updateView

Function updateView

packages/app-core/src/lib/database-cells.ts:239–244  ·  view source on GitHub ↗
(doc: DatabaseDoc, viewId: string, patch: Partial<DbView>)

Source from the content-addressed store, hash-verified

237}
238
239export function updateView(doc: DatabaseDoc, viewId: string, patch: Partial<DbView>): DatabaseDoc {
240 return {
241 ...doc,
242 views: doc.views.map((v) => (v.id === viewId ? ({ ...v, ...patch } as DbView) : v))
243 }
244}
245
246export function renameView(doc: DatabaseDoc, viewId: string, name: string): DatabaseDoc {
247 const trimmed = name.trim()

Callers 5

DatabaseBoardViewFunction · 0.90
fieldMenuItemsFunction · 0.90
moveColumnFunction · 0.85
moveColumnToFieldFunction · 0.85
renameViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected