Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Collections<A, A>

Type parameters

  • A: any

  • A: any

Hierarchy

Index

Properties

_consumes

_consumes: string[]

_eventHandlers

_eventHandlers: [string, function][]

_provides

_provides: Record<string, function>

_removeEventHandlers

_removeEventHandlers: function

Type declaration

    • (): void
    • Returns void

isInitialized

isInitialized: boolean

Static Optional _aliases

_aliases: object

Static _riot_id

_riot_id: number

Static actions

actions: ActionCreators

Static config

config: Configuration

Static flux

flux: FluxCapacitor

Static isMounted

isMounted: boolean

Static log

log: Logger

Static opts

opts: Props

Static Optional parent

parent: TagInstance

the parent tag if any

Static refs

refs: TagRefs

References to tags or DOM elements

Static root

root: HTMLElement

Static services

services: SystemServices

Static tags

tags: NestedTags

nested custom tags

Methods

consume

  • consume(alias: string): void
  • Parameters

    • alias: string

    Returns void

dispatch

  • dispatch(action: Action<string, any>): void
  • Parameters

    • action: Action<string, any>

    Returns void

getTotal

  • getTotal(total: number): string | number

init

  • init(): void

provide

  • provide(alias: string, resolve?: function): void
  • Parameters

    • alias: string
    • Optional resolve: function
        • Parameters

          Returns void

    Returns void

select

  • select(selector: function, ...args: any[]): any
  • Parameters

    • selector: function
        • (state: State, ...args: any[]): any
        • Parameters

          • state: State
          • Rest ...args: any[]

          Returns any

    • Rest ...args: any[]

    Returns any

selectCollections

  • selectCollections(collections: Selectable<Collection>): object[]

set

  • set(state: Partial<State> | true): void
  • Parameters

    • state: Partial<State> | true

    Returns void

subscribe

  • subscribe<T>(event: string, handler: function): void
  • Type parameters

    • T

    Parameters

    • event: string
    • handler: function
        • (data?: T): void
        • Parameters

          • Optional data: T

          Returns void

    Returns void

subscribeOnce

  • subscribeOnce(event: string, handler: function): void
  • Parameters

    • event: string
    • handler: function
        • (event: string, data?: any): void
        • Parameters

          • event: string
          • Optional data: any

          Returns void

    Returns void

updateCollectionTotal

  • updateCollectionTotal(__namedParameters: object): void

updateCollections

  • updateCollections(): void

Static expose

  • expose(alias: string, value?: any): void
  • Parameters

    • alias: string
    • Optional value: any

    Returns void

Static init

  • init(): void
  • Returns void

Static mixin

  • mixin(mixin: string | TagMixin): void
  • Extend tag with functionality available on shared mixin registered with riot.mixin(mixinName, mixinObject) or extend tag functionality with functionality available on provided mixin object.

    Parameters

    • mixin: string | TagMixin

      Name of shared mixin or mixin object

    Returns void

Static mount

  • mount(): void
  • Mount the tag

    Returns void

Static off

  • off(event: string, callback?: ObservableCallback): this
  • For specified event remove specified callback or all registered callbacks if callback is not passed in

    Parameters

    • event: string

      Event name or wildcard '*' that matches all events

    • Optional callback: ObservableCallback

      Callback function to remove

    Returns this

Static on

  • on(event: string, callback: ObservableCallback): this
  • Register callback for specified events. Callback is executed each time event is triggered

    Parameters

    • event: string

      Event name or wildcard '*' that matches all events

    • callback: ObservableCallback

      Callback function

    Returns this

Static onBeforeMount

  • onBeforeMount(): void
  • aliases are available here

    Returns void

Static onBeforeUnmount

  • onBeforeUnmount(): void
  • Returns void

Static onMount

  • onMount(): void
  • Returns void

Static onUnmount

  • onUnmount(): void
  • Returns void

Static onUpdate

  • onUpdate(stateChange?: object): void
  • Parameters

    • Optional stateChange: object

    Returns void

Static onUpdated

  • onUpdated(): void
  • Returns void

Static one

  • one(event: string, callback: ObservableCallback): this
  • Register callback for specified events. Callback is executed at most once.

    Parameters

    • event: string

      Event name.

    • callback: ObservableCallback

      Callback function

    Returns this

Static shouldUpdate

  • shouldUpdate(stateChange: object, nextOpts: Props): boolean
  • Parameters

    • stateChange: object
    • nextOpts: Props

    Returns boolean

Static trigger

  • trigger(event: string, ...args: any[]): this
  • Execute all callback functions registered for specified list of events

    Parameters

    • event: string

      Event name

    • Rest ...args: any[]

      Arguments provided to callbacks

    Returns this

Static unexpose

  • unexpose(alias: string): void
  • Parameters

    • alias: string

    Returns void

Static unmount

  • unmount(keepTheParent?: boolean): void
  • Detach the tag and its children from the page.

    Parameters

    • Optional keepTheParent: boolean

      If true unmounting tag doesn't remove the parent tag

    Returns void

Static update

  • update(data?: any): void
  • Updates all the expressions on the current tag instance as well as on all the children.

    Parameters

    • Optional data: any

      Context data

    Returns void

Static updateAlias

  • updateAlias(alias: string, value: any): void
  • Parameters

    • alias: string
    • value: any

    Returns void

Object literals

props

props: object

labels

labels: object

Type declaration

limitCount

limitCount: boolean = false

state

state: object

collections

collections: undefined[] = []

onSelect

  • onSelect(index: number): Action<"SELECT_COLLECTION", string>

Generated using TypeDoc