Closed Mangatt closed 7 years ago
Ok, I just found that state.blocks contain this information that I need. But there's another problem - selection change does not trigger isVoid node within selection re-render. What now?
Hmm... yeah, I can confirm this on blocks as well. Feels like this is a bug.
Is there a way how to trigger re-render? Or do I have to change all void blocks into normal ones?
I guess that it is components/node.js shouldComponentUpdate that is to blame. It is not taking void nodes into account at all.
Since I am not familiar with slate updating logic, is it possible to look into this? I found that @ianstormtaylor , you're author of this code, right?
I am currently bypassing that with redux, but that is far from ideal. It is not just about selecting, but in my case void blocks need to know about who are their immediate siblings.
How did you end up handling this? I also need to force a re-render on my void nodes but haven't been able to do it.
@michaelpietrykowski I'm using Redux to do that.
Hi, I'm currently not able to determine, which nodes are inside selection, not with help of docs anyway.
It can be demonstrated at emoji demo (http://slatejs.org/#/emojis). When I click on emoji, it has blue border around it. But when I make selection with text around emoji, it doesn't have selected style.
Is there a way how to achieve that? To indicate that node is within selection?