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

#1398 missing / not shipped along with Ship 0.13.2 #3629 ? #3849

Closed
goofballLogic opened this issue May 9, 2015 · 1 comment
Closed

#1398 missing / not shipped along with Ship 0.13.2 #3629 ? #3849

goofballLogic opened this issue May 9, 2015 · 1 comment

Comments

@goofballLogic
Copy link

I've been trying to use the improved server-side rendering support for selected options of a SELECT element, but upon inspecting the react code (I've checked npm and download versions of both 0.13.2 and 0.13.3), I can't find the fix for #1398 which was included in 0.13.2 according to #3629 . (and is tagged as such)

Specifically, I've been checking for the following snippet of code within ReactDOMSelect.js from sophiebits@ea089fd

Missing:

+  getInitialState: function() {
+    // Pass down initial value so initial generated markup has correct
+    // `selected` attributes
+    var value = LinkedValueUtils.getValue(this.props);
+    if (value != null) {
+      return {initialValue: value};
+    } else {
+      return {initialValue: this.props.defaultValue};
+    }
+  },

My code which isn't rendering server-side selected attr on options is:

<select name={option.value} defaultValue={option.order}>
{option.setting.map( function( setting ) {

   return <option value={setting.value}>{setting.text}</option>;

} )}
</select>
@goofballLogic goofballLogic changed the title #1398 missing / not shipped along with Ship 0.13.2 #3629? #1398 missing / not shipped along with Ship 0.13.2 #3629 ? May 9, 2015
@sophiebits
Copy link
Collaborator

No, #1398 didn't make the release; we decided it was a little too risky. (The "Did it." comment there refers to the release itself, not that PR.)

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

No branches or pull requests

2 participants