I guess we need to do this check so we don't try to focus a non-form element:
if (child.type.propTypes && child.type.propTypes.value && child.type.propTypes.valid) {
Just I don't use propTypes as I'm using typescript.
So I propose we do this another way:
if (typeof child.props.value !== 'undefined') {
That way the presence of the value property (with value or not) is enough.
I guess another way of doing this is to have a 'isSelectable' prop.
Let me know what you think and I'll prepare a pull-request
I guess we need to do this check so we don't try to focus a non-form element:
if (child.type.propTypes && child.type.propTypes.value && child.type.propTypes.valid) {
Just I don't use propTypes as I'm using typescript. So I propose we do this another way:
if (typeof child.props.value !== 'undefined') {
That way the presence of the value property (with value or not) is enough.
I guess another way of doing this is to have a 'isSelectable' prop.
Let me know what you think and I'll prepare a pull-request