Skip to content

Commit

Permalink
make functions abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
ckotzbauer committed Sep 19, 2017
1 parent abdd373 commit 1a2cbea
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/ts/BaseListBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ListboxSettings} from "./contract/ListboxSettings";
import {ListboxEvent} from "./event/ListboxEvent";
import {ListboxItem} from "./contract/ListboxItem";

export class BaseListBox {
export abstract class BaseListBox {

public static MAIN_CLASS: string = 'listbox-root';
public static MAIN_DISABLED_CLASS: string = 'listbox-disabled';
Expand Down Expand Up @@ -60,16 +60,14 @@ export class BaseListBox {
* @this {BaseListBox}
* @param {object} domItem a DOM object
*/
protected onItemClick(domItem: HTMLElement): void {
}
protected abstract onItemClick(domItem: HTMLElement): void;

/**
* Select first visible item if none selected.
*
* @this {BaseListBox}
*/
protected onFilterChange(): void {
}
protected abstract onFilterChange(): void;


/**
Expand All @@ -79,7 +77,7 @@ export class BaseListBox {
* @private
* @this {BaseListBox}
*/
public createListbox(): void {
protected createListbox(): void {
this._target.classList.add(BaseListBox.MAIN_CLASS);

if (this._settings.searchBar) {
Expand Down

0 comments on commit 1a2cbea

Please sign in to comment.