Text Field and Text Area
To take text as an input, we use the components, text field and text area.
The text area component in JUI represents an html <textarea/>
.
const textAreaJSON = {
"component": "textarea", //tells the component name
"id": "input_name", // can be used to give a unique identifier to a component
"data": "@name", // the variable storing the inputted text
"on-keyup": {
"name": "submitName",
"eventArgs": {
"keys": [
"ENTER"
]
}
},
},
Here, on-keyup
is the syntax for invoking the commands in the controllers.
This will produce a textArea where pressing ENTER will call the event submitName
The rendered text-area will look like this:
recommendation-more-help
11125c99-e1a1-4369-b5d7-fb3098b9b178