generated from Tinkoff/angular-open-source-starter
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct position for mention dropdown
- Loading branch information
Showing
3 changed files
with
39 additions
and
15 deletions.
There are no files selected for viewing
30 changes: 16 additions & 14 deletions
30
projects/demo/src/app/pages/mention/examples/1/mention/index.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,15 +1,17 @@ | ||
<tui-data-list (mouseleave.capture)="$event.stopPropagation()"> | ||
<button | ||
*ngFor="let item of getFilteredItems(items, mentionSuggestions); let i = index" | ||
tuiOption | ||
[tuiAutoFocus]="i == 0" | ||
(click)="setMention.emit(item)" | ||
(keydown.enter)="setMention.emit(item)" | ||
> | ||
{{ item.name }} | ||
<tui-avatar | ||
size="s" | ||
[src]="item.avatar || (item.name | tuiInitials)" | ||
/> | ||
</button> | ||
<tui-data-list> | ||
<div #container> | ||
<button | ||
*ngFor="let item of getFilteredItems(items, mentionSuggestions); let i = index" | ||
#button | ||
tuiOption | ||
(click)="setMention.emit(item)" | ||
(keydown.enter)="setMention.emit(item)" | ||
> | ||
{{ item.name }} | ||
<tui-avatar | ||
size="s" | ||
[src]="item.avatar || (item.name | tuiInitials)" | ||
/> | ||
</button> | ||
</div> | ||
</tui-data-list> |
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
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