No.
Currently, the autowhatever does not support using a class for the input component - see here.
const inputComponent = renderInputComponent({
type: 'text',
value: '',
autoComplete: 'off',
role: 'combobox',
'aria-autocomplete': 'list',
'aria-owns': itemsContainerId,
'aria-expanded': isOpen,
'aria-haspopup': isOpen,
'aria-activedescendant': ariaActivedescendant,
...theme(`react-autowhatever-${id}-input`, 'input'),
...this.props.inputProps,
onKeyDown: this.props.inputProps.onKeyDown && this.onKeyDown,
ref: this.storeInputReference
});
As you can see, the component is invoked as a pure function. When we tried to use a component that extends from React.Component, this method failed with Uncaught TypeError: Cannot call a class as a function
at the function shown above. It would be great to be able to support both types.
The specific case is that we're making our input fancy with icons and stuff, and need to add click behavior to the icons so that when you click on them, the input focuses even though you didn't actually click on the input.
Inside of the autowhatever, it could check to see if the inputComponent is a class or a function, and initialize it accordingly.