Skip to content

Commit

Permalink
Field types fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
radekmie committed Jun 11, 2016
1 parent 61ed904 commit 6b0ed46
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Expand Up @@ -12,7 +12,7 @@ const Text = props =>
name={props.name}
onChange={event => props.onChange(event.target.value)}
placeholder={props.placeholder}
type={props.type || 'text'}
type={typeof props.type === 'function' ? 'text' : props.type}
value={props.value}
/>

Expand Down
Expand Up @@ -12,7 +12,7 @@ const Text = props =>
name={props.name}
onChange={event => props.onChange(event.target.value)}
placeholder={props.placeholder}
type={props.type || 'text'}
type={typeof props.type === 'function' ? 'text' : props.type}
value={props.value}
/>
</FormGroup>
Expand Down
4 changes: 2 additions & 2 deletions packages/uniforms-semantic/src/components/fields/TextField.js
Expand Up @@ -11,7 +11,7 @@ const Text = ({
onChange,
placeholder,
required,
type = 'text',
type,
value,
...props
}) =>
Expand All @@ -27,7 +27,7 @@ const Text = ({
name={name}
onChange={event => onChange(event.target.value)}
placeholder={placeholder}
type={type}
type={typeof type === 'function' ? 'text' : type}
value={value}
/>
</section>
Expand Down
4 changes: 2 additions & 2 deletions packages/uniforms-unstyled/src/components/fields/TextField.js
Expand Up @@ -7,7 +7,7 @@ const Text = ({
name,
onChange,
placeholder,
type = 'text',
type,
value,
...props
}) =>
Expand All @@ -23,7 +23,7 @@ const Text = ({
name={name}
onChange={event => onChange(event.target.value)}
placeholder={placeholder}
type={type}
type={typeof type === 'function' ? 'text' : type}
value={value}
/>
</section>
Expand Down

0 comments on commit 6b0ed46

Please sign in to comment.