Perspective - Text Field
Component Palette Icon:
Description​
The Text Field component is used for input of any single-line text. This component will accept any alpha-numeric input.
If you need a field that accepts multiple lines of text, see the Perspective - Text Area component. If you're looking for a numeric field, see the Perspective - Numeric Entry Field component.
User Interaction​
The Text Field component properties have impact on the way a user can interact with a table in the runtime.
Interaction | General |
---|---|
Enabled | When the enabled property is set to true, a user can edit the text field in the runtime. The user must double click on the field or press enter in order to edit the field. When done, press enter or leave the field, and the text field becomes non-editable again. When the enabled property is set to false, it is not editable even when it receives input focus. |
General | The Text Field also supports the reject updates during edit feature. This feature ignores updates coming from property bindings while the component is being edited by a user. |
Properties​
Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.
Name | Description | Property Type |
---|---|---|
text | Text to display. | value: string |
placeholder | Text displayed when Text Field is empty. | value: string |
enabled | If true, user is allowed to alter text. | value: boolean |
deferUpdates | When true, updates to props.text will be deferred until focus is lost or enter is pressed. | value: boolean |
rejectUpdatesWhileFocused | When true, props.text will not accept updates from external sources while focused. | value: boolean |
spellcheck | New in 8.1.27 When true, text containing potential spelling errors will be underlined in red while the text is being edited in a launched session. Be aware there may be some slight behavioral differences in spellcheck error detection depending on the session browser. | value: boolean |
styles | Sets a style for this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class. | object |
Component Events​
The Perspective Event Types Reference page describes all the possible component event types for Perspective components. Not all component events support each Perspective component. The Component Events and Actions page shows how to configure events and actions on a Perspective component. Component scripting is handled separately and can be accessed from the Component menubar or by right clicking on the component.
Example​
This example shows the Text Field in two states: the top image is with text entered and the bottom image is without text entered.
Property | Value |
---|---|
props.text | Lab Results from QA: Chem Analysis OK |
props.placeholder | Single Line Entry |