Skip to content

Commit f46c147

Browse files
committed
feat(igx-combo): add combo component files #1260
1 parent 2f4f84b commit f46c147

File tree

4 files changed

+85
-0
lines changed

4 files changed

+85
-0
lines changed

src/combo/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# igx-combo
2+
3+
`igx-combo` is a component.
4+
A walkthrough of how to get started can be found [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/combo.html)
5+
6+
# Usage
7+
8+
9+
Basic usage of `igx-combo`
10+
11+
```html
12+
```
13+
14+
## API
15+
16+
# API Summary
17+
| Name | Type | Description |
18+
|:----------|:-------------:|:------|
19+
20+
### Methods
21+
22+
| open |
23+
|:----------|
24+
| Opens combo list items. |

src/combo/combo.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="igx-combo">
2+
<ng-content></ng-content>
3+
</div>

src/combo/combo.component.spec.ts

Whitespace-only changes.

src/combo/combo.component.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, NgModule, OnDestroy, OnInit, Output } from "@angular/core";
2+
import { IgxSelectionAPIService } from "../core/selection";
3+
import { IgxRippleModule } from "../directives/ripple/ripple.directive";
4+
5+
@Component({
6+
selector: "igx-combo",
7+
templateUrl: "combo.component.html"
8+
})
9+
export class IgxComboComponent implements OnInit, OnDestroy {
10+
@Input()
11+
public data;
12+
13+
@Input()
14+
public primaryKey;
15+
16+
@Output()
17+
public onDropDownOpen = new EventEmitter<IComboDropDownOpenEventArgs>();
18+
19+
@Output()
20+
public onDropDownClosed = new EventEmitter<IComboDropDownClosedEventArgs>();
21+
22+
@Output()
23+
public onSelectionChange = new EventEmitter<IComboSelectionChangeEventArgs>();
24+
25+
constructor(
26+
public selectionApi: IgxSelectionAPIService,
27+
public cdr: ChangeDetectorRef,
28+
private element: ElementRef) { }
29+
30+
public ngOnInit() {
31+
32+
}
33+
34+
public ngOnDestroy() {
35+
36+
}
37+
}
38+
39+
export interface IComboDropDownOpenEventArgs {
40+
event?: Event;
41+
}
42+
43+
export interface IComboDropDownClosedEventArgs {
44+
event?: Event;
45+
}
46+
47+
export interface IComboSelectionChangeEventArgs {
48+
oldSelection: any[];
49+
newSelection: any[];
50+
event?: Event;
51+
}
52+
53+
@NgModule({
54+
declarations: [IgxComboComponent],
55+
exports: [IgxComboComponent],
56+
imports: [IgxRippleModule]
57+
})
58+
export class IgxComboModule { }

0 commit comments

Comments
 (0)