Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

Empty content on first load #3

Open
DjLeChuck opened this issue Mar 27, 2017 · 6 comments
Open

Empty content on first load #3

DjLeChuck opened this issue Mar 27, 2017 · 6 comments

Comments

@DjLeChuck
Copy link

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.

demo

@fzaninotto
Copy link
Member

Can't reproduce the issue. Could you provide a simplified test case?

@DjLeChuck
Copy link
Author

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?

@fzaninotto
Copy link
Member

next will be a bit late - expect it end of April.

@thomasstreckercc
Copy link

What is the status of this? It seems to be still open as far as I am concerned.

@renetalk
Copy link

renetalk commented Oct 17, 2017

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 instructure-react/react-tinymce#21

@pbreah
Copy link

pbreah commented Jan 17, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants