Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tbody and thead tags to TableObserver #6139

Merged
merged 2 commits into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/lexical-table/src/LexicalTableObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ export class TableObserver {
const target = record.target;
const nodeName = target.nodeName;

if (nodeName === 'TABLE' || nodeName === 'TR') {
if (
nodeName === 'TABLE' ||
nodeName === 'TBODY' ||
nodeName === 'THEAD' ||
nodeName === 'TR'
) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by this logic, shouldn't THEAD be included as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point
added it

gridNeedsRedraw = true;
break;
}
Expand Down
Loading