From 79e6f164732875d3da860eb7bfb1b023103f13e3 Mon Sep 17 00:00:00 2001 From: Nick the Sick Date: Tue, 26 Nov 2024 11:48:01 +0100 Subject: [PATCH] chore: fix type for tables --- packages/extension-table/src/TableView.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/extension-table/src/TableView.ts b/packages/extension-table/src/TableView.ts index b7775bed74c..7d6d5ea6344 100644 --- a/packages/extension-table/src/TableView.ts +++ b/packages/extension-table/src/TableView.ts @@ -1,5 +1,5 @@ import { Node as ProseMirrorNode } from '@tiptap/pm/model' -import { NodeView } from '@tiptap/pm/view' +import { NodeView, ViewMutationRecord } from '@tiptap/pm/view' import { getColStyleDeclaration } from './utilities/colStyle.js' @@ -102,7 +102,7 @@ export class TableView implements NodeView { return true } - ignoreMutation(mutation: MutationRecord | { type: 'selection'; target: Element }) { + ignoreMutation(mutation: ViewMutationRecord) { return ( mutation.type === 'attributes' && (mutation.target === this.table || this.colgroup.contains(mutation.target))