getPlaceholder() {
switch (this.props.field.dataType) {
case 'DATE':
return 'MM/DD/YYYY'
case 'EMAIL':
return 'myemail@email.com'
default:
return null
}
}
render() {
return(
<div>
<input placeholder={field.focused ? this.getPlaceholder() : null} />
</div>
)
}
filed.focused is coming from redux. Returns a Boolean letting me know if field is focused or not.
this.props.field.dataType returns a string with the datatype.
I NEED to show the placeholder only on FOCUS.
This works in safari, Chrome, Firefox, and even edge. But not working in IE11.
Can anyone help?