-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Hi,
I wanted to implement react-input-trigger to project I work on. There I use MaterialUI and TextFields.
However react-input-trigger fails with onStart
Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
My component is as simple as:
const TextFieldComponent = ({ input, meta: { touched, error }, ...custom }) => {
const isError = Boolean(touched && error)
let helperText = custom.label !== custom.helperText ? custom.helperText : undefined
if (!helperText && error) {
helperText = error
}
return <InputTrigger
trigger={{
keyCode: 51,// hash code
shiftKey: true,
}}
onStart={(metaData) => { console.log(metaData) }}
>
<TextField
error={isError}
{...input}
{...custom}
helperText={helperText}
variant="outlined"
margin="normal"
/>
</InputTrigger>
}Seems error comes from dependency textarea-caret-position https://github.com/component/textarea-caret-position/blob/master/index.js#L71
Any idea how to make it work? It seems to me that it works only with html tags (textarea or input) and not React components, am I right?
rashmiap
Metadata
Metadata
Assignees
Labels
No labels