aor-rich-text-input
aor-rich-text-input copied to clipboard
Empty content on first load
Coming from the listing, the field is empty. After hitting refresh button, the field is filled.
If I log the value received in componentDidMount
, I see it's empty the first time and not the second one.
Can't reproduce the issue. Could you provide a simplified test case?
I'm with the master
branch not next
, maybe the behaviour is different.
If I'm not wrong next
should be available soon, so I can wait and test with it when it's out?
next
will be a bit late - expect it end of April.
What is the status of this? It seems to be still open as far as I am concerned.
I solved the problem by using another rich text editor. Even https://github.com/LoicMahieu/aor-tinymce-input has the same problem but the following implementation does work: https://github.com/HurricaneJames/react-tinymce-input
The problem seems to be that the rerendering of the component (happens multiple times on first draw) with changing values for the rich text input is not properly handled by the rich text editors. See https://github.com/instructure-react/react-tinymce/issues/21
I experienced the same issue, and this is a workaround:
{ props.record.field_name? <RichTextInput source="field_name" /> : null}
it makes sure your data is available before rendering your RichTextInput