Skip to content

BlockNote: Unable to update custom table props #1749

Open
@theabhayprajapati

Description

@theabhayprajapati

Describe the bug
I made a custom button for the Table named table setting Settings and it should update the tableSource value but i am not able to do that.

Image

I added a updated the defaultProps and added this
tableSource: { default: "" as const, },
, but I'm encountering issues when trying to access or update that property. While debugging, I noticed that the values are correctly passed to updateBlockTr() and tr.setNodeMarkup() functions, but the properties don't persist after these calls.

To Reproduce

  1. Created a custom table prop schema that extends the default table props
  2. Attempted to update the tableSource property using the editor.updateBlock() method
  3. Values appear to be passed correctly to the internal update functions
  4. However, the updated property doesn't persist in the block after the update

Misc

  • Node version: 20
  • Package manager: pnpm
  • Browser: chrome
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingprio:lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions