Skip to content
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

Editor: Update RichInputField to use inputValue instead of value #249

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

Samk13
Copy link
Member

@Samk13 Samk13 commented Aug 1, 2024

❤️ Thank you for your contribution!

Description

  • Added missing initialValue prop for RichInputField
  • Update prop value to inputValue
  • This will fix the input text issue in deposit pages, and communities settings pages
  • Request comments work as expected.

Communities Invite members still need to be fixed

Closes inveniosoftware/invenio-app-rdm#2771

I'm currently on vacation, from a quick test when I changed inputValue to a function in the RichEditor instead of the RichInputField, it caused request comments to not clear the input after submission. This PR satisfies all editors except the "community members invite" editor, for which I can submit a similar fix if we agree.

Note : By providing the input value as a function instead of a string, it will fix the render issue. However, this will result in the console error: "Invalid prop value of type function supplied to Editor, expected string."

Feel free to implement a better solution if found.

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

* Added missing initialValue prop
* Update prop value to inputValue
* This will fix the issue in deposit page, communities Invite members, communities settings pages
closes inveniosoftware/invenio-app-rdm#2771
Copy link
Contributor

@max-moser max-moser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it out locally, this seems to fix the issue – thanks a ton!

@max-moser max-moser merged commit d13d7a6 into inveniosoftware:master Aug 2, 2024
2 checks passed
@Samk13 Samk13 deleted the fix-richtext-inputfield branch August 8, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deposit form: description field loses content after losing focus
2 participants