Merge pull request #554 from mgcrea/patch-feat-name-prop

Patch feat name prop
old
Javi Velasco 2016-06-16 20:14:48 +02:00 committed by GitHub
commit 250f1f0ec6
5 changed files with 8 additions and 3 deletions

View File

@ -12,6 +12,7 @@ const factory = (Check) => {
className: PropTypes.string,
disabled: PropTypes.bool,
label: PropTypes.any,
name: PropTypes.string,
onChange: PropTypes.func,
theme: PropTypes.shape({
disabled: PropTypes.string,

View File

@ -23,10 +23,10 @@ const factory = (Input, DatePickerDialog) => {
]),
inputClassName: PropTypes.string,
inputFormat: PropTypes.func,
name: PropTypes.string,
label: PropTypes.string,
maxDate: PropTypes.object,
minDate: PropTypes.object,
name: PropTypes.string,
onChange: PropTypes.func,
theme: PropTypes.shape({
input: PropTypes.string

View File

@ -15,6 +15,7 @@ const factory = (Input) => {
disabled: PropTypes.bool,
error: PropTypes.string,
label: PropTypes.string,
name: PropTypes.string,
onBlur: PropTypes.func,
onChange: PropTypes.func,
onFocus: PropTypes.func,
@ -94,6 +95,9 @@ const factory = (Input) => {
handleSelect = (item, event) => {
if (this.props.onBlur) this.props.onBlur(event);
if (!this.props.disabled && this.props.onChange) {
if (this.props.name) {
event.target.name = this.props.name;
}
this.props.onChange(item, event);
this.setState({active: false});
}

View File

@ -17,10 +17,10 @@ const factory = (FontIcon) => {
React.PropTypes.string,
React.PropTypes.element
]),
name: React.PropTypes.string,
label: React.PropTypes.string,
maxLength: React.PropTypes.number,
multiline: React.PropTypes.bool,
name: React.PropTypes.string,
onBlur: React.PropTypes.func,
onChange: React.PropTypes.func,
onFocus: React.PropTypes.func,

View File

@ -15,8 +15,8 @@ const factory = (TimePickerDialog, Input) => {
error: PropTypes.string,
format: PropTypes.oneOf(['24hr', 'ampm']),
inputClassName: PropTypes.string,
name: PropTypes.string,
label: PropTypes.string,
name: PropTypes.string,
onChange: PropTypes.func,
theme: PropTypes.shape({
input: PropTypes.string