Home Reference Source
import TextInputTemplate from '~/template/Form/TextInputTemplate.js'
public class | source

TextInputTemplate

Extends:

js/template/template/Template.js~Template → TextInputTemplate

Constructor Summary

Public Constructor
public

constructor(type: TextInputType, placeholder: string, opts: Object)

A group of label and the input

Member Summary

Public Members
public
public

If is owned by another style manager

public

If to fill width

public get
public

Value of the input

Method Summary

Public Methods
public
public

focus(focusValue: boolean)

Sets focus

public

observeFocus(): Observable

Observes the focus of the text input.

public

observeValue(): Observable

Observes the value of the text input.

Public Constructors

public constructor(type: TextInputType, placeholder: string, opts: Object) source

A group of label and the input

Params:

NameTypeAttributeDescription
type TextInputType
placeholder string
opts Object
opts.classes string

Additional classes

opts.autofocus boolean
  • optional
  • default: false
opts.initialValue string
  • optional
  • default: ""
  • nullable: true

Starting value

opts.autocomplete boolean
  • optional
  • default: false
opts.isOwned boolean
  • optional
  • default: false

If the wrapper elem manages styles

opts.isWide boolean
  • optional
  • default: false

If the text input should fill width.

Public Members

public delegate source

public isOwned: boolean source

If is owned by another style manager

public isWide: boolean source

If to fill width

public get userInput source

public value: string source

Value of the input

Public Methods

public didLoad() source

public focus(focusValue: boolean) source

Sets focus

Params:

NameTypeAttributeDescription
focusValue boolean
  • optional
  • default: true

false if to unfocus true if to

public observeFocus(): Observable source

Observes the focus of the text input.

Return:

Observable

public observeValue(): Observable source

Observes the value of the text input.

Return:

Observable