Search results

TextBoxComponent

Represents the EJ2 Angular TextBox Component.

<ejs-textbox [value]='value'></ejs-textbox>

Properties

cssClass

string

Specifies the CSS class value that is appended to wrapper of Textbox.

Defaults to

enablePersistence

boolean

Enable or disable persisting TextBox state between page reloads. If enabled, the value state will be persisted.

Defaults to false

enableRtl

boolean

Specifies a Boolean value that enable or disable the RTL mode on the Textbox. The content of Textbox display from right to left direction when enable this RTL mode.

Defaults to false

enabled

boolean

Specifies a Boolean value that indicates whether the TextBox allow user to interact with it.

Defaults to true

floatLabelType

string

Specifies the floating label behavior of the TextBox that the placeholder text floats above the TextBox based on the below values. Possible values are:

  • Never - The placeholder text should not be float ever.
  • Always - The placeholder text floats above the TextBox always.
  • Auto - The placeholder text floats above the TextBox while focusing or enter a value in Textbox.

Defaults to Never

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to undefined

placeholder

string

Specifies the text that is shown as a hint/placeholder until the user focus or enter a value in Textbox. The property is depending on the floatLabelType property.

Defaults to null

readonly

boolean

Specifies the boolean value whether the TextBox allows user to change the text.

Defaults to false

showClearButton

boolean

Specifies a Boolean value that indicates whether the clear button is displayed in Textbox.

Defaults to false

type

string

Specifies the behavior of the TextBox such as text, password, email, etc.

Defaults to ‘text’

value

string

Sets the content of the TextBox.

Defaults to null

Methods

addAttributes

Adding the multiple attributes as key-value pair to the TextBox element.

Returns void

destroy

Removes the component from the DOM and detaches all its related event handlers. Also, it maintains the initial TextBox element from the DOM.

Returns void

getPersistData

Gets the properties to be maintained in the persisted state.

Returns string

removeAttributes

Removing the multiple attributes as key-value pair to the TextBox element.

Parameter Type Description
attributes string[] Specifies the attributes name to be removed from TextBox element.

Returns void

Events

blur

EmitType<FocusOutEventArgs>

Triggers when the TextBox has focus-out.

change

EmitType<ChangedEventArgs>

Triggers when the content of TextBox has changed and gets focus-out.

created

EmitType<Object>

Triggers when the TextBox component is created.

destroyed

EmitType<Object>

Triggers when the TextBox component is destroyed.

focus

EmitType<FocusInEventArgs>

Triggers when the TextBox gets focus.

input

EmitType<InputEventArgs>

Triggers each time when the value of TextBox has changed.