inveniosoftware / react-invenio-forms

React component library for Formik components.
https://react-invenio-forms.readthedocs.io
MIT License
0 stars 27 forks source link

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

Closed Samk13 closed 3 months ago

Samk13 commented 3 months ago

:heart: Thank you for your contribution!

Description

Communities Invite members still need to be fixed

Closes https://github.com/inveniosoftware/invenio-app-rdm/issues/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.