Skip to content

fix(MarkdownEditor): pass down a key from parent to avoid losing focus while on controlled state#104

Merged
pybuche merged 1 commit intomainfrom
pybuche/fix-editor-key
Jul 28, 2022
Merged

fix(MarkdownEditor): pass down a key from parent to avoid losing focus while on controlled state#104
pybuche merged 1 commit intomainfrom
pybuche/fix-editor-key

Conversation

@pybuche
Copy link
Copy Markdown
Contributor

@pybuche pybuche commented Jul 28, 2022

Problem

This component doesn't behave properly when rerendered without a key.
Current key is generated within the component. Hence when it's rerendering, the key changes.

Solution

For now, i haven't found a better fix than add a parentKey prop to help the use of this field fix the key from the parent.

@pybuche pybuche requested a review from ivangabriele July 28, 2022 08:01
@pybuche pybuche merged commit 1cd7677 into main Jul 28, 2022
@pybuche pybuche deleted the pybuche/fix-editor-key branch July 28, 2022 08:07
@ivangabriele
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 4.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants