-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: (platform) Fixing styles for input auto-complete example (#3192)
* Fixing styles for input auto-complete example * Changing <a> to <span> * Fixing issues with typeahead popover * Fixing auto-complete example. * Update platform-input-auto-complete-validation-example.component.html * Update platform-input-auto-complete-validation-example.component.html
- Loading branch information
1 parent
9f8b22d
commit 366523d
Showing
2 changed files
with
39 additions
and
44 deletions.
There are no files selected for viewing
44 changes: 20 additions & 24 deletions
44
...put/platform-input-example/platform-input-auto-complete-validation-example.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,31 @@ | ||
<div> | ||
<fd-popover class="fd-popover" [isOpen]="open"> | ||
<fd-popover class="fd-popover" [triggers]="[]" [isOpen]="open" #typeahead> | ||
<fd-popover-control> | ||
<fdp-input | ||
[type]="'text'" | ||
[id]="'form-input-7'" | ||
[name]="'autoCompletTextInput'" | ||
[placeholder]="'Enter the sport name'" | ||
type="text" | ||
id="form-input-7" | ||
name="autoCompletTextInput" | ||
placeholder="Enter the sport name" | ||
[(ngModel)]="inputText" | ||
(input)="onSearchChange()" | ||
[ariaLabel]="'Input with Auto complete'" | ||
ariaLabel="Input with Auto complete" | ||
> | ||
</fdp-input> | ||
</fd-popover-control> | ||
<fd-popover-body *ngIf="options && options.length"> | ||
<ng-container [ngTemplateOutlet]="menuTemplate"> </ng-container> | ||
<fd-popover-body> | ||
<nav class="fd-menu"> | ||
<ul fd-menu-list class="fd-menu__list"> | ||
<li fd-menu-list-item | ||
class="fd-menu__item" | ||
*ngFor="let option of options" | ||
(click)="onItemClick(option)" | ||
> | ||
<span class="fd-menu__link"> | ||
{{ option }} | ||
</span> | ||
</li> | ||
</ul> | ||
</nav> | ||
</fd-popover-body> | ||
</fd-popover> | ||
</div> | ||
<ng-template #menuTemplate> | ||
<div *ngIf="!itemTemplate" class="fd-popover__body fd-popover__body--no-arrow"> | ||
<nav class="fd-menu"> | ||
<ul fd-menu-list class="fd-menu__list"> | ||
<li | ||
fd-menu-list-item | ||
class="fd-menu__item" | ||
*ngFor="let option of options" | ||
(click)="onItemClick(option)" | ||
> | ||
{{ option }} | ||
</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
</ng-template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters