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/form-elements-module.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -271,6 +271,7 @@ In [app.component.html](https://github.com/SQ-UI/ng-sq-ui/blob/master/src/app/ap
271
271
272
272
```html
273
273
<sq-typeaheadname="typeahead"
274
+
displayProp="displayName"
274
275
formControlName="typeahead"
275
276
[searchResults]="searchResults"
276
277
(onUserInputEnd)="searchMethod($event)"
@@ -303,6 +304,8 @@ export class AppComponent {
303
304
}
304
305
```
305
306
307
+
> If you wish to pass just an array of string, you must omit the property `displayProp` in the html.
308
+
306
309
### Component properties:
307
310
308
311
- **`@Input()` name:** `string` - Name of the typeahead. If not provided, a generic name is generated, using the following pattern: `'sq-form-control'+newDate().getTime().toString()`.
@@ -327,6 +330,8 @@ export class AppComponent {
327
330
328
331
- **`@Input()` multiple:** `boolean` - Allow the user to choose multiple items from the search results list. Defaults to `false`.
329
332
333
+
- **`@Input()` displayProp:** `string` - Specify which property of the object to use as display property. If you are just passing an array of strings you must not assign a value to this property.
334
+
330
335
### Class properties:
331
336
332
337
- **queryInputControl:** `FormControl` - The model for the input where the user types in a `query`.
0 commit comments