Small issue: List showing nulls, not numbers, on render
james-pratama opened this issue · comments
@james-pratama could you provide steps or a sandbox to reproduce this?
I have the same problem.
It can also be found at the following URL example.
https://www.blocknotejs.org/examples/basic/all-blocks
( Line of Numbered List Item)
If you go back and forth between example > basic > (product line-up),
number list item becomes null when out of focus
We also have this issue, and any help would be greatly appreciated.
https://blog.opengtm.ai/how-strategic-territory-planning-can-boost-sales-performance
![Screenshot 2024-05-03 at 12 05 01 AM](https://private-user-images.githubusercontent.com/36022919/327657896-f0e896f7-0ac8-4c88-8846-2f9524fb55d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NTcyMzksIm5iZiI6MTcyMTc1NjkzOSwicGF0aCI6Ii8zNjAyMjkxOS8zMjc2NTc4OTYtZjBlODk2ZjctMGFjOC00Yzg4LTg4NDYtMmY5NTI0ZmI1NWQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDE3NDg1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwM2M3Y2ViMWYwZmU3ODJkOWU5OTAzNzM0MDBhMjJiYzRmYzdkNThkZDU4MjkxYjdiMzg3ZTNhZWJhMmQ1N2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oKYMhE9ZCMy_99F7fscmQVO1wthIeQ0IqqLaRbUuIZQ)
We have a same issue as well.
I have the same issue, i fix it temporarily using this trick:
useEffect(() => {
let timeout: NodeJS.Timeout;
if (editor) {
timeout = setTimeout(() => {
const firstBlock = editor.document[0];
if (firstBlock) editor.updateBlock(firstBlock, { type: firstBlock.type });
}, 100);
}
return () => {
clearTimeout(timeout);
};
}, [editor]);
basically just update a block and it will not show as null after render
I've encountered something similar as well, will try implementing temporary fix used by @Dadangdut33.
Hi, haven't seen this issue before - if anyone can post steps to reproduce it that would be great!
@matthewlipski If you have multiple tabs using BlockNoteView, the numbered list will become null when you switch tabs. Additionally, when the BlockNoteView is in a non-editable state, the numbered list will also become null when you reload the page.
Screen.Recording.2024-06-13.at.09.13.13.mov
if anyone can post steps to reproduce it that would be great!
Hope it helps, so basically:
- Intialize blocknote with data
- Render blocknote
- null will be shown for data that is using list until you click on the editor (or do an edit programmatically)
Thanks! Helps a lot, we'll look into it next time we do a bugfix release