DefinitelyTyped/types/react-autosuggest
Nathan Shively-Sanders f0ce987bc1 Update project urls to match NPM url
Note that this *trivially* updates project urls by adding the NPM url to
the end, even when the urls are almost identical or the DT one is
outdated. I'll clean up the urls in a later commit.

This PR is unfinished! Please do not merge it yet.
2019-02-11 17:10:55 -08:00
..
index.d.ts
react-autosuggest-tests.tsx
README.md
tsconfig.json
tslint.json

react-autosuggest usage notes

The definition uses generics for stronger typing. Read the TypeScript deep dive on JSX Generic components for details on consuming these type definitions.

Example

import * as Autosuggest from 'react-autosuggest'
interface Language {
    name: string
    year: number
}

const LanguageAutosuggest = Autosuggest as { new (): Autosuggest<Language> }

<LanguageAutosuggest
    suggestions={suggestions}
    onSuggestionsFetchRequested={this.onSuggestionsFetchRequested.bind(this)}
    getSuggestionValue={this.getSuggestionValue}
    renderSuggestion={this.renderSuggestion}
    onSuggestionSelected={this.onSuggestionsSelected}
    alwaysRenderSuggestions={true}
    inputProps={inputProps}
    theme={theme}
/>

Find multiple full examples in react-autosuggest-tests.tsx