mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge pull request #2933 from atmire/reset-dropdown-values
Reset dropdown values
This commit is contained in:
@@ -41,6 +41,12 @@
|
|||||||
[scrollWindow]="false">
|
[scrollWindow]="false">
|
||||||
|
|
||||||
<button class="dropdown-item disabled" *ngIf="optionsList && optionsList.length === 0">{{'form.no-results' | translate}}</button>
|
<button class="dropdown-item disabled" *ngIf="optionsList && optionsList.length === 0">{{'form.no-results' | translate}}</button>
|
||||||
|
<button class="dropdown-item collection-item text-truncate"
|
||||||
|
(click)="onSelect(undefined); sdRef.close()" (mousedown)="onSelect(undefined); sdRef.close()"
|
||||||
|
title="{{ 'dropdown.clear.tooltip' | translate }}" role="option"
|
||||||
|
>
|
||||||
|
<i>{{ 'dropdown.clear' | translate }}</i>
|
||||||
|
</button>
|
||||||
<button class="dropdown-item collection-item text-truncate" *ngFor="let listEntry of optionsList; let i = index"
|
<button class="dropdown-item collection-item text-truncate" *ngFor="let listEntry of optionsList; let i = index"
|
||||||
[class.active]="i === selectedIndex"
|
[class.active]="i === selectedIndex"
|
||||||
(keydown.enter)="onSelect(listEntry); sdRef.close()" (mousedown)="onSelect(listEntry); sdRef.close()"
|
(keydown.enter)="onSelect(listEntry); sdRef.close()" (mousedown)="onSelect(listEntry); sdRef.close()"
|
||||||
|
@@ -186,7 +186,7 @@ describe('Dynamic Dynamic Scrollable Dropdown component', () => {
|
|||||||
scrollableDropdownFixture.detectChanges();
|
scrollableDropdownFixture.detectChanges();
|
||||||
|
|
||||||
de = scrollableDropdownFixture.debugElement.queryAll(By.css('button.dropdown-item'));
|
de = scrollableDropdownFixture.debugElement.queryAll(By.css('button.dropdown-item'));
|
||||||
btnEl = de[0].nativeElement;
|
btnEl = de[1].nativeElement;
|
||||||
|
|
||||||
btnEl.dispatchEvent(mousedownEvent);
|
btnEl.dispatchEvent(mousedownEvent);
|
||||||
scrollableDropdownFixture.detectChanges();
|
scrollableDropdownFixture.detectChanges();
|
||||||
|
@@ -1682,6 +1682,10 @@
|
|||||||
|
|
||||||
"deny-request-copy.success": "Successfully denied item request",
|
"deny-request-copy.success": "Successfully denied item request",
|
||||||
|
|
||||||
|
"dropdown.clear": "Clear selection",
|
||||||
|
|
||||||
|
"dropdown.clear.tooltip": "Clear the selected option",
|
||||||
|
|
||||||
"dso.name.untitled": "Untitled",
|
"dso.name.untitled": "Untitled",
|
||||||
|
|
||||||
"dso.name.unnamed": "Unnamed",
|
"dso.name.unnamed": "Unnamed",
|
||||||
|
Reference in New Issue
Block a user