diff --git a/README.md b/README.md index 93432da..d971cad 100644 --- a/README.md +++ b/README.md @@ -59,20 +59,22 @@ const ExampleClient = () => { ## AutoSuggest props: | propName | Description | | --- | --- | -| **type** | Passing "server" will tell the component to render an AutoSuggestServer component. If a type is not passed and a url argument is passed, the component infers the type to be server. If no type is passed (or a type other than "server" is passed), AutoSuggestClient component is rendered. | -| **name** | name used for the autosuggest input label and the ids of nested elements | +| **id** | value used to generate ids of nested elements | +| **type** | passing "server" will tell the component to render an AutoSuggestServer component. If a type is not passed and a url argument is passed, the component infers the type to be server. If no type is passed (or a type other than "server" is passed), AutoSuggestClient component is rendered. | +| **name** | name used for the autosuggest input label. If `id` prop is not provided, the `name` prop is used for generating the ids of nested elements | | **url** | endpoint to query to generate the suggestions list. Component expects the url to accept input text as a parameter, not query.

Example:
With "https://ntsb-server.herokuapp.com/api/accidents/makeList" as the url,
if a user typed 'Bo' into the input field, a request would be sent to
https://ntsb-server.herokuapp.com/api/accidents/makeList/Bo) | -| **debounceTime** | The amount of milliseconds to wait before sending requests to url based on input | -| **styles** | An object to customize the appearance of the AutoSuggest component | +| **debounceTime** | the amount of milliseconds to wait before sending requests to url based on input | +| **styles** | an object to customize the appearance of the AutoSuggest component | | **options** | The array of options if the autosuggest is created using a list of items already in the application | -| **handleChange** | Array for updating the text in the autosuggest field | -| **value** | The value of the autosuggest field | -| **caseInsensitive** | Setting for Client version of AutoSuggest, whether to perform case-insensitive matches against the options array | +| **handleChange** | array for updating the text in the autosuggest field | +| **value** | the value of the autosuggest field | +| **caseInsensitive** | setting for Client version of AutoSuggest, whether to perform case-insensitive matches against the options array | ## AutoSuggest Default Props | propName | type | defaultValue | | --- | --- | --- | +| **id** | string | "" | | **type** | string | "" | | **name** | string | "Search" | | **url** | string | "" | @@ -106,7 +108,7 @@ Using our earlier example ```jsx
- + ``` @@ -115,23 +117,23 @@ If the user entered "brau" into the input field, the resulting html would look l ```html
-
4 suggestions displayed. To navigate, use up and down arrow keys. +
4 suggestions displayed. To navigate, use up and down arrow keys.
-
-