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

Table doesn't save columns width after refresh #655

Open
1 task
serhiiAntonyshynFulcrumRocks opened this issue Mar 19, 2024 · 0 comments · May be fixed by #856
Open
1 task

Table doesn't save columns width after refresh #655

serhiiAntonyshynFulcrumRocks opened this issue Mar 19, 2024 · 0 comments · May be fixed by #856
Labels
bug Something isn't working prio:mid Medium priority

Comments

@serhiiAntonyshynFulcrumRocks
Copy link

serhiiAntonyshynFulcrumRocks commented Mar 19, 2024

Describe the bug
Table doesn't save columns width after refresh

To Reproduce
I resize the columns width for editor table.
After that I save the content to the api ( I save all the content that editor return in editor.topLevelBlocks from onEditorContentChange ), but after refresh table has the default width for column
It happens because the styles object is empty and there is no information for updated column width

image

How can I pass column width from editor table to styles object?

Misc

  • Node version: 20.9.0
  • Package manager: npm
  • Browser: Chrome
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖
@serhiiAntonyshynFulcrumRocks serhiiAntonyshynFulcrumRocks added the bug Something isn't working label Mar 19, 2024
@matthewlipski matthewlipski added the prio:mid Medium priority label Jun 11, 2024
halimt92 added a commit to fabriq/BlockNote that referenced this issue Jun 16, 2024
When resizing a table, prosemirror changes the colgroup's col widths without transmitting this data to the table nodes. This is related to [this issue](TypeCellOS#655). The fix consists of listening to the mouse up event and checking for a change in any of the columns from prosemirror. If there is a change that should affect a cell, we update the cells of the table. This will re-render the table. We persist the width information in a property for the node. Thus we had to change the typing of cell contents.
@matthewlipski matthewlipski linked a pull request Jun 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working prio:mid Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants