-
Notifications
You must be signed in to change notification settings - Fork 759
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
Strange behaviour with select and default value #851
Comments
Is this issue, the way React handles forms? https://reactjs.org/docs/forms.html#the-select-tag |
@pioz If you don't have React Dev Tools installed, first step in troubleshooting this is to install them and inspect actual props passed to the select tag. |
I investigated this issue, it is not a react-rails issue but an issue in react's hydrate. The issue has been fixed here facebook/react#11602 |
Thanks @mabid , once I'm notified there's a new release of react, I'll update the pre-bundle for sprockets users. |
No updates on this for a long time. Closing this one. |
Steps to reproduce
I've created a new rails app 5.1 and add react-rails 2.4.3:
I've create a simple React component
Hello.jsx
And I render this component on
app/views/posts/index.html.erb
<%= react_component('Hello', {}, {prerender: true}) %>
Expected behavior
When I visit the page http://localhost:3000/posts I should see the select and nothing on console.log
Actual behavior
In console.log I get
Warning: Text content did not match. Server: "Select this to set value to 1" Client: "Select this to set value to "
System configuration
Sprockets version: 3.7.1
React-Rails version: 2.4.3
Rails version: 5.1
Ruby version: 2.4.2
The text was updated successfully, but these errors were encountered: