Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ul>
<li *ngFor="let repos of filteredList; let i = index" [class.active]="i === selected" class="repos" (click)="changeValue(repos)">{{repos.name}}</li>
<li tabindex="0" *ngFor="let repos of filteredList; let i = index" [class.active]="i === selected" class="repos" (click)="changeValue(repos)" (keyup.enter)="changeValue(repos)">{{repos.name}}</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class ExampleMentionDropdownComponent implements FateDropdown {
public filteredList: Array<any>;
private filterList() {
this.filteredList = [];
const criteria = this._value.substr(1);
const criteria = this._value?.substr(1) || '';
for (const repos of this.reposList) {
if (repos.name.toLowerCase().indexOf(criteria.toLowerCase()) > -1) {
this.filteredList.push(repos);
Expand Down
2 changes: 1 addition & 1 deletion src/app/fate-ui/fate-ui.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div>
<ng-container *ngFor="let button of buttons">
<a *ngIf="button !== 'separator'" tabindex="0" class="fate-ui-button" [name]="button" [ngClass]="{enabled: enabled[button], 'with-dropdown': dropdownAction === button}" (click)="do($event, button)">
<a *ngIf="button !== 'separator'" tabindex="0" class="fate-ui-button" [title]="button" [name]="button" [ngClass]="{enabled: enabled[button], 'with-dropdown': dropdownAction === button}" (click)="do($event, button)">
<span *ngIf="icon.getIcon(button)" [innerHtml]="icon.getIcon(button)"></span>
<span *ngIf="!icon.getIcon(button)">{{controller.getAction(button).label}}</span>
<span class="reader">{{controller.getAction(button).name}}</span>
Expand Down
6 changes: 2 additions & 4 deletions src/app/fate-ui/fate-ui.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ $font-size: 14px;
}
}
.fate-ui-dropdown {
opacity: 0;
pointer-events: none;
display: none;
z-index: 1;
font-size: 14px;
user-select: all;
Expand All @@ -69,7 +68,6 @@ $font-size: 14px;
box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.3);

&.visible {
opacity: 1;
pointer-events: all;
display: block;
}
}
2 changes: 2 additions & 0 deletions src/app/fate-ui/fate-ui.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ export class FateUiComponent implements OnChanges, AfterViewInit {
if (name) {
this.do(event, name);
}
} else if (event.key === 'Escape') {
this.dropdownAction = false;
}
}

Expand Down