Permalink
Browse files

Merge pull request #152 from Arthelon/fix-select-wrapper

Previously, some props being passed to the base select component (such as the critical onChange prop) were being overridden by null values from the component's defaultProps property. As a result, some select components on the site (i.e. the gender select input) were not functional. This change fixes this behavior by ensuring that the named props always overrides the default ones.
  • Loading branch information...
LordSputnik committed Dec 4, 2017
2 parents 43580a5 + 6a42c2f commit dc4a829e127e439709a6286a41f5e0c7bbdc6ab0
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/client/components/input/select-wrapper.js
@@ -94,13 +94,13 @@ class SelectWrapper extends React.Component {
}
<div className={wrapperClassName}>
<Child
{...props}
labelKey={labelAttribute}
multi={multiple}
ref={(ref) => this.select = ref}
value={childValue}
valueKey={idAttribute}
onChange={this.handleChange}
{...props}
/>
</div>
</div>

0 comments on commit dc4a829

Please sign in to comment.