Class IgxSelectItemComponent

The <igx-drop-down-item> is a container intended for row items in a <igx-drop-down> container.

Hierarchy

Hierarchy (view full)

Constructors

Properties

id: string = ...

Sets/gets the id of the item.

<igx-drop-down-item [id] = 'igx-drop-down-item-0'></igx-drop-down-item>
let itemId =  this.item.id;

Memberof

IgxSelectItemComponent

role: string = 'option'

Gets/sets the role attribute of the item. Default is 'option'.

 <igx-drop-down-item [role]="customRole"></igx-drop-down-item>
value: any

Gets/sets the value of the item if the item is databound

// usage in IgxDropDownItemComponent
// get
let mySelectedItemValue = this.dropdown.selectedItem.value;

// set
let mySelectedItem = this.dropdown.selectedItem;
mySelectedItem.value = { id: 123, name: 'Example Name' }

// usage in IgxComboItemComponent
// get
let myComboItemValue = this.combo.items[0].value;

Accessors

  • get disabled(): boolean
  • Sets/gets if the given item is disabled

     // get
    let mySelectedItem = this.dropdown.selectedItem;
    let myItemIsDisabled = mySelectedItem.disabled;
     <igx-drop-down-item *ngFor="let item of items" disabled={{!item.disabled}}>
    <div>
    {{item.field}}
    </div>
    </igx-drop-down-item>

    NOTE: Drop-down items inside of a disabled IgxDropDownGroup will always count as disabled

    Returns boolean

  • set disabled(value): void
  • Parameters

    • value: boolean

    Returns void

Methods