Skip to content

Commit 0241ae5

Browse files
committed
Merge branch 'master' of github.com:IBM/carbon-components-angular
2 parents 3870cdd + 6e31536 commit 0241ae5

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

src/combobox/combobox.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import { NG_VALUE_ACCESSOR } from "@angular/forms";
6767
class="bx--text-input"
6868
aria-label="ListBox input field"
6969
autocomplete="off"
70-
placeholder="Filter..."/>
70+
[placeholder]="placeholder"/>
7171
<div
7272
[ngClass]="{'bx--list-box__menu-icon--open': open}"
7373
class="bx--list-box__menu-icon">
@@ -132,7 +132,7 @@ export class ComboBox implements OnChanges, OnInit, AfterViewInit, AfterContentI
132132
* Text to show when nothing is selected.
133133
* @memberof ComboBox
134134
*/
135-
@Input() placeholder = "";
135+
@Input() placeholder = "Filter...";
136136
/**
137137
* Combo box type (supporting single or multi selection of items).
138138
* @type {("single" | "multi")}
@@ -351,6 +351,9 @@ export class ComboBox implements OnChanges, OnInit, AfterViewInit, AfterContentI
351351
});
352352
this.view["updateList"](this.items);
353353
this.updatePills();
354+
// clearSelected can only fire on type=multi
355+
// so we just emit getSelected() (just in case there's any disabled but selected items)
356+
this.selected.emit(this.view.getSelected() as any);
354357
}
355358

356359
/**

src/combobox/combobox.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ storiesOf("Combobox", module)
1616
.addDecorator(withKnobs)
1717
.add("Basic", () => ({
1818
template: `
19-
<ibm-combo-box [items]="items">
19+
<ibm-combo-box [items]="items" (selected)="selected($event)">
2020
<ibm-dropdown-list></ibm-dropdown-list>
2121
</ibm-combo-box>
2222
`,
@@ -40,7 +40,7 @@ storiesOf("Combobox", module)
4040
}))
4141
.add("Multi-select", () => ({
4242
template: `
43-
<ibm-combo-box [items]="items" type="multi">
43+
<ibm-combo-box [items]="items" type="multi" (selected)="selected($event)">
4444
<ibm-dropdown-list></ibm-dropdown-list>
4545
</ibm-combo-box>
4646
`,

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ export * from "./input/input.module";
2222
export * from "./select/select.module";
2323
export * from "./tiles/tiles.module";
2424
export * from "./progress-indicator/progress-indicator.module";
25+
export * from "./pagination/pagination.module";

src/input/input.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ import { Directive, HostBinding } from "@angular/core";
1515
selector: "[ibmText]"
1616
})
1717
export class TextInput {
18-
@HostBinding("class") inputClass = "bx--text-input";
18+
@HostBinding("class.bx--text-input") inputClass = true;
1919
}

src/modal/alert-modal.interface.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,16 @@ export interface ModalButton {
5656
* Display value of the button
5757
*/
5858
text: string;
59+
/**
60+
* Optional unique ID for the button
61+
*/
62+
id?: string;
5963
/**
6064
* Button type
6165
*/
62-
type: ModalButtonType;
66+
type?: ModalButtonType;
6367
/**
6468
* Callback for the button `click` event
6569
*/
66-
click: Function;
70+
click?: Function;
6771
}

0 commit comments

Comments
 (0)