Skip to content
Evgenii Koriakin edited this page Jul 8, 2016 · 2 revisions

Summary

The data source of the component which is used to display a list of values.

Default value

Value: []

Returns

Type: Array<Object>

Examples

Sets items field:

HTML:

<eq-combo-box #fabricsComboBox
    [items]=fabrics>
</eq-combo-box>

TypeScript:

export class AppComponent {
    fabrics = [
        { name: 'Cotton', id: '1' },
        { name: 'Polyester', id: '2' },
        { name: 'Cotton/Polyester', id: '3' },
        { name: 'Rib Knit', id: '4' }
    ];

    @ViewChild('fabricsComboBox') fabricsComboBox: EqwadComboBox;
}

Gets items field:

HTML:

<eq-combo-box #fabricsComboBox
    [items]=fabrics>
</eq-combo-box>

TypeScript:

export class AppComponent {
    fabrics = [
        { name: 'Cotton', id: '1' },
        { name: 'Polyester', id: '2' },
        { name: 'Cotton/Polyester', id: '3' },
        { name: 'Rib Knit', id: '4' }
    ];

    @ViewChild('fabricsComboBox') fabricsComboBox: EqwadComboBox;

    constructor() {
        setTimeout(() => {
            let items = this.fabricsComboBox.items;
        }, 1000);
    }
}
Clone this wiki locally