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

RichTextInput doesn't accept defaultValue prop #2465

Closed
manolisan opened this issue Oct 24, 2018 · 3 comments
Closed

RichTextInput doesn't accept defaultValue prop #2465

manolisan opened this issue Oct 24, 2018 · 3 comments
Assignees
Labels

Comments

@manolisan
Copy link

What you were expecting:
Using a component like that <RichTextInput defaultValue="<p>Hello</p>" /> should result in a RichTextInput component having a prefiled value.

What happened instead:
The component renders without the default value.

Related code:
<RichTextInput defaultValue="Initial Value" />

Environment

  • React-admin version: 2.3.3
  • React version: 16.3.2
  • Browser: Chrome 69.0
@fzaninotto
Copy link
Member

Confirmed and reproduced

@fzaninotto fzaninotto added the bug label Oct 25, 2018
@fzaninotto
Copy link
Member

in fact, it's a duplicate of #2464

@manolisan
Copy link
Author

I am not sure if accepting defaultValue prop will fix #2464

#2464 is not about the default value of the RichTextInput component.

Behavior of Input components on redux-change actions
In general, on an Input component, when a redux-state change happens, the Input component should re-render it's value on React.

Behavior of RichTextInput on redux-change actions caused by other components
However if the componet is a RichTextInput and the redux-state change is caused by an action other than writing in that specific component (e.g. writing on another RichTextInput component with the same source), it doesn't re-render it in React.

Let me know if it's clear or not, to provide you a code example in the next days.

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

No branches or pull requests

2 participants