new TextArea()
Example
import {TextArea} from "mvcomponents/input"; let textArea:TextArea = new TextArea() .setRows(5); this.append(textArea);
Extends
Methods
-
getRawValue()
-
- Inherited From:
Returns:
- Type
- string
-
getValue()
-
Obtém o valor atual do componente. O método
setBlankWhenNull
pode fazer com que a resposta varie- Inherited From:
Returns:
- Type
- string
-
isBlankWhenNull()
-
Retorna o valor alterado, caso tenha executado o 'setBlankWhenNull(on)'.
- Inherited From:
Returns:
- Type
- boolean
-
isNullable()
-
Retorna
true
caso o campo aceite 'null' como valor- Inherited From:
Returns:
- Type
- boolean
-
setBlankWhenNull(on)
-
Caso o valor
true
seja informado, ao executar ogetValue()
será retornado uma string vazia quando o campo estiver vazio. Do contrário, será retornadonull
.Parameters:
Name Type Description on
boolean - Inherited From:
Returns:
- Type
- this
-
setHeight(height)
-
Altera a altura do TextArea.
Parameters:
Name Type Description height
string Altura do TextArea.
Returns:
- Type
- TextArea
Example
let textArea:TextArea = new TextArea(); textArea.setHeight("200px");
-
setMask(mask)
-
Informa a mascara que será utilizada pelo input
Parameters:
Name Type Description mask
string - Inherited From:
Returns:
- Type
- this
-
setMaxLength(value)
-
Parameters:
Name Type Description value
number - Inherited From:
Returns:
- Type
- this
-
setNullable(on)
-
Caso seja informado
true
o campo irá assumir 'null' como valor quandosetValue(null)
for executado.Parameters:
Name Type Description on
boolean - Inherited From:
Returns:
- Type
- this
-
setRawValue(value)
-
Parameters:
Name Type Description value
string - Inherited From:
Returns:
- Type
- this
-
setRows(rows)
-
Altera o numero de linhas que devem ter no TextArea.
Parameters:
Name Type Description rows
number Número de linhas.
Returns:
- Type
- TextArea
Example
let textArea:TextArea = new TextArea(); textArea.setRows(10);
-
setValue(value)
-
Atualiza o valor atual do componente
Parameters:
Name Type Description value
string | number - Inherited From:
Returns:
- Type
- this