This is the validated component that replaces FwTextarea
, so as expected it renders a textarea, which will validate, show red if an error, and display error messages.
Because this is always a textarea component, it is much less complex than the FwValidatedInputContainer
component, but because of how this is written, the ONLY options
you are able to use are the ones detailed in this documentation (other properties that are able to be used in FwTextarea
because it extends other textareas will not be able
to be used in this one because it doesn't extend a textarea due to the other aspects defined in this component). Here is an example of basic usage:
<FwValidatedTextarea @model={{model}} @valuePath="desc" @label="Description" @update={{action (mut model.desc)}} />
afterLabel
StringThis is an HTML safe property which will display whatever vanilla HTML you give it after the label and before the text area. (note: since it is vanilla HtML, it will not render components properly)
autoresize
BooleanAutoresize allows the textarea to expand as more data is put into it. This is expanded with the ember-cli-autoresize
.
Default: true
disabled
BooleanThis boolean will determine if the text area is usable. A disabled textarea will display the value, but be unable to be edited. For more information click here
helpText
StringThis is the text that will display in place of the error message if there is no error message to show (if there is an error message, that will trump this message)
infoText
StringThis is the message displayed in the FwInfoIcon
directly after the label. (this info icon will be before whatever content is in the afterLabel property)
label
StringLabel is the words that are displayed as a label right before the textarea. Because of this property, there is no need to define a label before the component in your code.
max-height
StringGoes with autoresize. This is the maximum height a FwTextarea will grow to. If it is null, the FwTextarea will grow indefinitely. If autoresize is false, it is set to 56.8 px.
maxCount
NumberSets the limit of how many characters are allowed to be typed. Whichever of maxlength or maxCount is greater will determine the actual limit, but the count will display as negative and red if maxlength is surpassed.
Default: 3000
min-height
StringGoes with autoresize. This is the minimum height an empty textarea will be. This is also a css string for height. If autoresize is false, this is set to 56.8px.
placeholder
StringPlaceholder is the placeholder of the text area. It displays inside the textarea whenever the text area is empty. For more information click here.
rows
NumberNumber of lines in height the textarea is to start out. Use this or min-height
, not both.
Default: 2
showCount
BooleanIf true, number of characters remaining will appear below the textarea, on the right.
Default: true