You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-18Lines changed: 20 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,20 +59,22 @@ const ExampleClient = () => {
59
59
## AutoSuggest props:
60
60
| propName | Description |
61
61
| --- | --- |
62
-
|**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. |
63
-
|**name**| name used for the autosuggest input label and the ids of nested elements |
62
+
|**id**| value used to generate ids of nested elements |
63
+
|**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. |
64
+
|**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 |
64
65
|**url**| endpoint to query to generate the suggestions list. Component expects the url to accept input text as a parameter, not query.<br><br>Example:<br>With "https://ntsb-server.herokuapp.com/api/accidents/makeList" as the url,<br>if a user typed 'Bo' into the input field, a request would be sent to<br>https://ntsb-server.herokuapp.com/api/accidents/makeList/Bo)|
65
-
|**debounceTime**|The amount of milliseconds to wait before sending requests to url based on input |
66
-
|**styles**|An object to customize the appearance of the AutoSuggest component |
66
+
|**debounceTime**|the amount of milliseconds to wait before sending requests to url based on input |
67
+
|**styles**|an object to customize the appearance of the AutoSuggest component |
67
68
|**options**| The array of options if the autosuggest is created using a list of items already in the application |
68
-
|**handleChange**|Array for updating the text in the autosuggest field |
69
-
|**value**|The value of the autosuggest field |
70
-
|**caseInsensitive**|Setting for Client version of AutoSuggest, whether to perform case-insensitive matches against the options array |
69
+
|**handleChange**|array for updating the text in the autosuggest field |
70
+
|**value**|the value of the autosuggest field |
71
+
|**caseInsensitive**|setting for Client version of AutoSuggest, whether to perform case-insensitive matches against the options array |
@@ -115,23 +117,23 @@ If the user entered "brau" into the input field, the resulting html would look l
115
117
116
118
```html
117
119
<form>
118
-
<divid="Make-announcement"class="visually-hidden"aria-live="polite"style="position: absolute; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden;">4 suggestions displayed. To navigate, use up and down arrow keys.
120
+
<divid="desktop-make-announcement"class="visually-hidden"aria-live="polite"style="position: absolute; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden;">4 suggestions displayed. To navigate, use up and down arrow keys.
0 commit comments