Skip to content

Commit 3336ecb

Browse files
committed
2 parents f31dfcc + 4d640e8 commit 3336ecb

File tree

12 files changed

+79
-27
lines changed

12 files changed

+79
-27
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
</a>
1616
<a href="https://bestpractices.coreinfrastructure.org/projects/5887">
1717
<img src="https://bestpractices.coreinfrastructure.org/projects/5887/badge">
18+
</a>
19+
<a href="https://discord.gg/J7JEUEkTRX">
20+
<img src="https://img.shields.io/discord/689212587170201628?color=5865F2" alt="Chat with us on Discord">
1821
</a>
1922
</p>
2023
</p>

integration/ng13/package-lock.json

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration/ng14/package-lock.json

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration/ng15/package-lock.json

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/carbon.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ assets:
145145
name: Storybook
146146
action: link
147147
url: https://angular.carbondesignsystem.com/?path=/story/components-date-picker--simple
148+
definition-tooltip:
149+
status: stable
150+
framework: angular
151+
demoLinks:
152+
- type: storybook
153+
name: Storybook
154+
action: link
155+
url: https://angular.carbondesignsystem.com/?path=/story/components-tooltip-definition
148156
dialogs:
149157
externalDocsUrl: https://carbondesignsystem.com/patterns/dialog-pattern
150158
status: stable
@@ -467,14 +475,6 @@ assets:
467475
name: Storybook
468476
action: link
469477
url: https://angular.carbondesignsystem.com/?path=/story/components-toggle
470-
tooltip-definition:
471-
status: stable
472-
framework: angular
473-
demoLinks:
474-
- type: storybook
475-
name: Storybook
476-
action: link
477-
url: https://angular.carbondesignsystem.com/?path=/story/components-tooltip-definition
478478
tooltip-icon:
479479
name: Tooltip icon
480480
status: stable

src/combobox/combobox.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,12 @@ export class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnD
394394
selected: boolean
395395
}
396396
}>();
397-
/** emits an empty event when the menu is closed */
397+
/** Emits an empty event when the menu is closed */
398398
@Output() close = new EventEmitter<void>();
399-
/** emits the search string from the input */
399+
/** Emits the search string from the input */
400400
@Output() search = new EventEmitter<string>();
401+
/** Emits an event when the clear button is clicked. */
402+
@Output() clear = new EventEmitter();
401403
/** ContentChild reference to the instantiated dropdown list */
402404
@ContentChild(AbstractDropdownView, { static: true }) view: AbstractDropdownView;
403405
@ViewChild("dropdownMenu") dropdownMenu;
@@ -669,6 +671,7 @@ export class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnD
669671
const selected = this.view.getSelected();
670672
this.propagateChangeCallback(selected);
671673
this.selected.emit(selected as any);
674+
this.clear.emit();
672675
}
673676

674677
/**

src/combobox/combobox.stories.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,24 @@ export default {
4747
},
4848
{
4949
content: "four"
50+
},
51+
{
52+
content: "five"
53+
},
54+
{
55+
content: "six"
56+
},
57+
{
58+
content: "seven"
59+
},
60+
{
61+
content: "eight"
62+
},
63+
{
64+
content: "nine"
65+
},
66+
{
67+
content: "ten"
5068
}
5169
],
5270
appendInline: false,

src/dialog/dialog.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class DialogDirective implements OnInit, OnDestroy, OnChanges {
155155
if (changes.isOpen) {
156156
if (changes.isOpen.currentValue) {
157157
this.open();
158-
} else {
158+
} else if (!changes.isOpen.firstChange) {
159159
this.close({
160160
reason: CloseReasons.programmatic
161161
});

src/dropdown/list/dropdown-list.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,13 +502,13 @@ export class DropdownList implements AbstractDropdownView, AfterViewInit, OnDest
502502
event.preventDefault();
503503
if (event.key === "ArrowDown") {
504504
if (this.hasNextElement()) {
505-
this.getNextElement();
505+
this.getNextElement().scrollIntoView({block: "end"});
506506
} else {
507507
this.blurIntent.emit("bottom");
508508
}
509509
} else if (event.key === "ArrowUp") {
510510
if (this.hasPrevElement()) {
511-
this.getPrevElement();
511+
this.getPrevElement().scrollIntoView();
512512
} else {
513513
this.blurIntent.emit("top");
514514
}

src/input/label.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import {
77
TemplateRef,
88
ViewChild,
99
ContentChild,
10-
AfterContentInit
10+
AfterContentInit,
11+
ChangeDetectorRef
1112
} from "@angular/core";
1213

1314
import { TextArea } from "./text-area.directive";
@@ -145,6 +146,11 @@ export class Label implements AfterContentInit, AfterViewInit {
145146

146147
@HostBinding("class.cds--form-item") labelClass = true;
147148

149+
/**
150+
* Creates an instance of Label.
151+
*/
152+
constructor(protected changeDetectorRef: ChangeDetectorRef) {}
153+
148154
/**
149155
* Update wrapper class if a textarea is hosted.
150156
*/
@@ -165,6 +171,7 @@ export class Label implements AfterContentInit, AfterViewInit {
165171
// avoid overriding ids already set by the user reuse it instead
166172
if (inputElement.id) {
167173
this.labelInputID = inputElement.id;
174+
this.changeDetectorRef.detectChanges();
168175
}
169176
inputElement.setAttribute("id", this.labelInputID);
170177
return;
@@ -174,6 +181,7 @@ export class Label implements AfterContentInit, AfterViewInit {
174181
if (divElement) {
175182
if (divElement.id) {
176183
this.labelInputID = divElement.id;
184+
this.changeDetectorRef.detectChanges();
177185
}
178186
divElement.setAttribute("id", this.labelInputID);
179187
}

0 commit comments

Comments
 (0)