Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KList<T>

Type parameters

  • T

Hierarchy

Implements

Index

Constructors

constructor

  • new KList<T>(tag: string, attribs: any, ctor: Fn<T, any>, keyFn?: Fn2<T, number, NumOrString>): KList<T>

Properties

Protected attribs

attribs: any

Optional cache

cache: Map<NumOrString, KListItem>

Protected ctor

ctor: Fn<T, any>

Optional el

el: Element

This component's main DOM element, i.e. usually the element created when the component is IComponent.mounted. This element will be used as default by various helper methods in the Component class.

Optional items

items: KListItem[] = ...

Protected keyFn

keyFn: Fn2<T, number, NumOrString> = ...

Protected tag

tag: string

Methods

$attribs

  • $attribs(attribs: any, el?: Element): void

$clear

  • $clear(el?: Element): Element

$compile

$el

  • $el(tag: string, attribs?: any, body?: any, parent?: undefined | Element, idx?: NumOrElement): Element

$html

  • $html(body: MaybeDeref<string>): void

$moveTo

  • $moveTo(newParent: Element, el?: Element, idx?: NumOrElement): void

$remove

  • $remove(el?: Element): void

$style

  • $style(rules: any, el?: Element): void

$text

  • $text(body: any): void

$tree

  • $tree(tree: any, root?: Element, index?: NumOrElement): Promise<any>

mount

  • mount(parent: Element, index: NumOrElement, state: T[]): Promise<Element>

unmount

  • unmount(): Promise<void>

update

  • update(curr: T[]): Promise<void>

Generated using TypeDoc