@siberiaweb/components
Version:
44 lines (33 loc) • 775 B
text/typescript
import Item from "../dropdown-list/Item";
/**
* Событие выбора. Отменяемое.
*/
export default class SelectEvent extends Event {
/**
* Наименование события.
*/
public static readonly EVENT_NAME: string = "SelectSelect";
/**
* Позиция.
*/
private readonly item: Item;
/**
* Получение позиции.
*/
public getItem(): Item {
return this.item;
}
/**
* Конструктор.
*
* @param item Позиция.
*/
constructor(
item: Item
) {
super( SelectEvent.EVENT_NAME, {
cancelable: true
} );
this.item = item;
}
}