Type Parameters

Hierarchy

  • default<TEvent>
    • ISelectablePicker

Properties

_nativeObject: any
items: string[]

Gets/sets items of the SelectablePicker.

Property

Android

Since

4.0.5

title: string

Gets/sets title of the SelectablePicker. This property only works with show method. Must set before show method.

Property

= Picker]

Android

Since

4.0.5

titleColor: IColor

Gets/sets titleColor of the SelectablePicker. This property only works with show method. Must set before show method.

Property

= Color.BLACK]

Android

Since

4.0.5

titleFont: IFont

Gets/sets titleFont of the SelectablePicker. This property only works with show method. Must set before show method.

Property

Android

Since

4.0.5

multiSelectEnabled: boolean

Gets/sets multiSelectEnabled of the SelectablePicker. You must set this property in constructor and can not change this property on run-time. Otherwise SelectablePicker may not work properly. This property only works with show method. Must set before show method.

Property

= false]

Android

Since

4.0.5

cancelable: boolean

Gets/sets cancelable of the SelectablePicker. If click outside of dialog, it will be canceled. This property only works with show method. Must set before show method.

Property

= true]

Android

Since

4.0.5

checkedItems: number | number[]

Gets/sets checkedItems of the SelectablePicker. If multiSelectEnabled is false, checkedItems must be a spesific index of the items array or array of index. This property only works with show method. Must set before show method.

Property

= -1]

Android

Since

4.0.5

backgroundColor: IColor

Gets/sets backgroundColor of the SelectablePicker. This property only works with show method. Must set before show method.

Property

= Color.WHITE]

Android

Since

4.0.5

cancelButtonColor: IColor

Gets/sets cancelButtonColor of the SelectablePicker. This property only works with show method. Must set before show method.

Property

Android

Since

4.0.5

cancelButtonFont: IFont

Gets/sets cancelButtonFont of the SelectablePicker. This property only works with show method. Must set before show method.

Property

Android

Since

4.0.5

cancelButtonText: string

Gets/sets cancelButtonText of the SelectablePicker. This property only works with show method. Must set before show method.

Property

= Cancel]

Android

Since

4.0.5

doneButtonColor: IColor

Gets/sets doneButtonColor of the SelectablePicker. This property only works with show method. Must set before show method.

Property

Android

Since

4.0.5

doneButtonText: string

Gets/sets doneButtonText of the SelectablePicker. This property only works with show method. Must set before show method.

Property

= Ok]

Android

Since

4.0.5

doneButtonFont: IFont

Gets/sets doneButtonFont of the SelectablePicker. This property only works with show method. Must set before show method.

Property

Android

Since

4.0.5

Accessors

  • get nativeObject(): any
  • Returns any

  • set nativeObject(value: any): void
  • Parameters

    • value: any

    Returns void

  • get ios(): TProps["ios"]
  • Returns TProps["ios"]

  • get android(): TProps["android"]
  • Returns TProps["android"]

Methods

  • Executed before everything. This should return nativeObject since it will be assinged directly to nativeObject.

    Parameters

    • Optional params: Partial<Record<string, any>>

    Returns any

  • Parameters

    • Optional params: Partial<Record<string, any>>

    Returns void

  • Parameters

    • props: Partial<{ [key: string]: any }>

    Returns void

  • Parameters

    • props: Partial<{ [key: string]: any }>

    Returns void

  • This function shows SelectablePicker in a dialog.

    Method

    show

    Android

    Since

    4.0.5

    Parameters

    • done: ((param: { items: number | number[] }) => void)

      This event is called when user clicks done button.

        • (param: { items: number | number[] }): void
        • Parameters

          • param: { items: number | number[] }
            • items: number | number[]

          Returns void

    • cancel: (() => void)

      This event is called when user clicks cancel button.

        • (): void
        • Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((index?: number, selected?: boolean) => void)
        • (index?: number, selected?: boolean): void
        • Parameters

          • Optional index: number
          • Optional selected: boolean

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((index?: number, selected?: boolean) => void)
        • (index?: number, selected?: boolean): void
        • Parameters

          • Optional index: number
          • Optional selected: boolean

          Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • eventName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • Optional index: number
    • Optional selected: boolean

    Returns void

  • Parameters

    • eventName: "selected"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • eventName: string
    • Rest ...args: any[]

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((index?: number, selected?: boolean) => void)
        • (index?: number, selected?: boolean): void
        • Parameters

          • Optional index: number
          • Optional selected: boolean

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((index?: number, selected?: boolean) => void)
        • (index?: number, selected?: boolean): void
        • Parameters

          • Optional index: number
          • Optional selected: boolean

          Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • eventName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((index?: number, selected?: boolean) => void)
        • (index?: number, selected?: boolean): void
        • Parameters

          • Optional index: number
          • Optional selected: boolean

          Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • eventName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

Events

onSelected: ((index?: number, selected?: boolean) => void)

Type declaration

    • (index?: number, selected?: boolean): void
    • This event is called when an item is selected/unselected on the SelectablePicker. If multiSelectEnabled is false, selected will be always true.

      Deprecated

      Android

      Since

      4.0.5

      Example

      import SelectablePicker from '@smartface/native/ui/selectablepicker';

      const selectablePicker = new SelectablePicker();
      selectablePicker.on(SelectablePicker.Events.Selected, (params) => {
      console.info('onSelected', params);
      });

      Parameters

      • Optional index: number
      • Optional selected: boolean

        onSelected

      Returns void

Generated using TypeDoc