Skip to content

Commit

Permalink
Bugfix för dropdown select
Browse files Browse the repository at this point in the history
  • Loading branch information
kebarvid committed Dec 3, 2020
1 parent 1584223 commit d897265
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Change-log](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

# 7.8.2 (Beta, 2020-12-03)
- Fixing a bug in `vgr-dropdown-select` where focus got stuck in filter fi deselectable was active.
# 7.8.1 (Beta, 2020-11-10)
- Various bugfixes for `vgr-dropdown-select`.

Expand Down
2 changes: 1 addition & 1 deletion projects/komponentkartan/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vgr-komponentkartan",
"version": "7.8.1-beta1",
"version": "7.8.2-beta1",
"peerDependencies": {
"@angular/common": "^9.1.7",
"@angular/core": "^9.1.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export class DropdownSelectComponent implements OnChanges, AfterContentInit, Aft
} else if (event.key === 'ArrowDown' || event.key === 'Down') {
if (this.multi) {
this.selectAll.nativeElement.focus();
} else if (this.deselectable) {
} else if (this.deselectable && this.value) {
this.deselectButton.focus();
} else if (filteredItems.length) {
filteredItems[0].focus();
Expand Down Expand Up @@ -535,7 +535,7 @@ export class DropdownSelectComponent implements OnChanges, AfterContentInit, Aft
filteredItems[itemIndex - 1].focus();
} else if (this.multi) {
this.selectAll.nativeElement.focus();
} else if (this.deselectable) {
} else if (this.deselectable && this.value) {
this.deselectButton.focus();
} else if (this.filterVisible) {
this.filter.focus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</div>
<div class="one-third">
<p>Stor, 50 alternativ</p>
<vgr-dropdown-select>
<vgr-dropdown-select [deselectable]="true">
<vgr-dropdown-item *ngFor="let item of items50">{{item}}</vgr-dropdown-item>
</vgr-dropdown-select>
</div>
Expand Down

0 comments on commit d897265

Please sign in to comment.