Skip to content

Debounce keypress event with react-throttle #28

@walkerrandolphsmith

Description

@walkerrandolphsmith

An onChange event is bound to an input in the lookup component. I need this to happen once the query in the search field seems to be done.

I believe react-throttle will handle this situation like the following:

<Debounce time="200" handler="onChange">
    <input value={query}
                       disabled={selected}
                       style={finalInputStyles}
                       type="text"
                       placeholder={placeholder}
                       onKeyDown={this.handleKeyPress}
                       onChange={this.onChange}
                       onFocus={this.onFocus}
                />
</Debounce >

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions