-
Notifications
You must be signed in to change notification settings - Fork 117
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
@contentful/field-editor-rich-text re-rendering problem #1173
Comments
Hi, I encountered the same issue with basically the same use case. After some debugging I tracked down the issue to the ids of the respective Unfortunately there doesn't seem to be a fix available without rewriting the internal rich text editor logic. |
Thank you so much @niclaszllaudi for pinpointing the issue in the codebase. I have used |
Can you share more about your use case @niclaszllaudi & @giovanni-caiazzo ? For the internal ids calculation we use the entry key + field id + the locale code. So, in theory, it should only clash if you are rendering the same entry field for the same locale twice. Is that the case for you? |
Hi @z0al. In my use case I have a contentful app that is rendering a json field as a collection of rich text fields, each accessible with its own tab. I used patch-package to add a new prop to ConnectedRichEditor in order to add a custom ID appended to the ID you are creating like you described. |
Hi @z0al, we want to render two |
Marking issue as stale since there was no acitivty for 30 days |
Hi all,
I am using @contentful/field-editor-rich-text in a contentful app, version 2.1.0 and I have some problems with rerendering.
Basically I am rendering a set of tabs and each tab has an instance of @contentful/field-editor-rich-text:
When the component first renders it works great, but as soon as I change tab, the editor disappears and never reappears even when I return to the original tab. When the page is reloaded the editor reappears, only to disappear again as soon as a new tab is selected.
I also tried to render all the editors together without tabs: what happens is that all the editors have the content of the last rendered editor, which is not ideal.
Here is the full Field component
Is there something I'm doing wrong when rendering the editors? Or is this a bug of the editor? Version 1 did not have this problem using the same code structure, but it did have problems selecting the text and changing it.
The text was updated successfully, but these errors were encountered: