-
Notifications
You must be signed in to change notification settings - Fork 785
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
Adds more natural default header option when inserting table columns #1006
Conversation
🦋 Changeset detectedLatest commit: 56b2551 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/udecode/plate/9yd9vuxHsEKjtY8RBBxt9CZ8h6fy |
Thanks @dylans! Looking forward to getting this merged in 👍 |
Thanks @tjramage ! |
Description
When inserting a new column to an existing table, the current implementation of the
addColumn
transform only allows for all table cells to be a header at once (TH
) or none at all. However, most of the time, you usually want the top row of cells to remain as a table header and all other instances as standardTD
cells.This PR allows the flexibility for the header option to be more consistent with the current table row that we're iterating through when inserting a new column 🙂
To maintain backwards compatibility, I've made sure that this only happens if the header option is not set. If the header option is already configured when calling
addColumn
, then this will override the default behaviour for all table cell instances.Checklist
yarn test
.yarn lint
. (Fix errors withyarn lint --fix
.)yarn docs
.)