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: docs/components/autocomplete/index.md
+10-6
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ If you are building forms, you may be interested in the [AutocompleteField](./au
7
7
8
8
Required.
9
9
10
-
`@noResultsText` is shown when there are no results after filtering.
10
+
`@noResultsText` is shown when there are no results after filtering.
11
11
12
12
```hbs
13
13
<Form::Controls::Autocomplete
@@ -37,7 +37,7 @@ A CSS class to add to this component's content container. Commonly used to speci
37
37
38
38
Optional.
39
39
40
-
`@options` forms the content of this component.
40
+
`@options` forms the content of this component.
41
41
42
42
```hbs
43
43
<Form::Controls::Autocomplete
@@ -86,8 +86,8 @@ export default class extends Component {
86
86
87
87
Optional.
88
88
89
-
Called when the user makes a selection.
90
-
It is called with the selected option (derived from `@options`) as its only argument.
89
+
Called when the user makes a selection.
90
+
It is called with the selected option (derived from `@options`) as its only argument.
91
91
You'll want to update `@selected` with the new value in your on change handler.
92
92
93
93
```hbs
@@ -125,8 +125,8 @@ export default class extends Component {
125
125
126
126
Optional.
127
127
128
-
By default, when `@options` are an array of strings, the built-in filtering does simple `String.prototype.startsWith` filtering.
129
-
There may be cases where you need to write your own filtering logic completely that is more complex than the built-in `String.prototype.startsWith` filtering described.
128
+
By default, when `@options` are an array of strings, the built-in filtering does simple `String.prototype.startsWith` filtering.
129
+
There may be cases where you need to write your own filtering logic completely that is more complex than the built-in `String.prototype.startsWith` filtering described.
130
130
To do so, leverage `@onFilter` instead. This function should return an array of items that will then be used to populate the dropdown results.
131
131
132
132
```hbs
@@ -224,3 +224,7 @@ Set the `@hasError` argument to apply an error box shadow to the `<input>`.
0 commit comments