Skip to content

console error when component loads #7

Description

@Bill-Dagg

The following error occurs in the browser console window when the component loads:

Warning: React does not recognize the `delayTimeout` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `delaytimeout` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    in input
    in TextInput
    in DelayInput
    in label
    in Text
    in Unknown
    in Unknown
    in Unknown
    ...

This is because 'delayTimeout' is being passed through to TextInput properties:

  render() {
    const { onChangeText, inputRef, ...props } = this.props;
    const { value } = this.state;

    return (
      <TextInput
        {...props}
        onChangeText={this.onChangeText}
        onBlur={this.onBlur}
        value={value}
        ref={inputRef}
      />
    );
  }

Problem easily rectified by adding 'delayTimeout' as the follows:

const { onChangeText, inputRef, delayTimeout, ...props } = this.props;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions