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

Method applyTransform

packages/app-core/src/lib/cm-table.ts:183–189  ·  view source on GitHub ↗

Pull pending cell edits into the model, then apply a structural * transform and commit — all without an intermediate dispatch, so our DOM * stays attached for the single `commitTable` write.

(
    fn: (model: MarkdownTable) => MarkdownTable,
    focus?: CellAddress
  )

Source from the content-addressed store, hash-verified

181 * transform and commit — all without an intermediate dispatch, so our DOM
182 * stays attached for the single `commitTable` write. */
183 private applyTransform(
184 fn: (model: MarkdownTable) => MarkdownTable,
185 focus?: CellAddress
186 ): void {
187 this.syncFromDom()
188 this.applyModel(fn(this.model), focus)
189 }
190
191 private focusCellAt(addr: CellAddress): void {
192 const view = this.view

Callers 2

toDOMMethod · 0.95
onCellKeydownMethod · 0.95

Calls 2

syncFromDomMethod · 0.95
applyModelMethod · 0.95

Tested by

no test coverage detected