Class OtpFocusInEventArgs
Provides data for the OnFocus event when an input field receives focus.
Namespace: Syncfusion.Blazor.Inputs
Assembly: Syncfusion.Blazor.dll
Syntax
public class OtpFocusInEventArgs : Object
Remarks
This class contains information about the focus event, including which field was focused, the current component value, and whether the focus was initiated by user interaction.
Constructors
OtpFocusInEventArgs()
Declaration
public OtpFocusInEventArgs()
Properties
Index
Gets or sets the zero-based index of the input field that received focus.
Declaration
public int Index { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer representing the position of the focused input field within the SfOtpInput component,
where 0 is the first field and |
Remarks
This index corresponds to the visual position of the input field from left to right (or right to left in RTL layouts) and can be used to implement field-specific logic.
IsInteracted
Gets or sets a value indicating whether the focus event was triggered by direct user interaction.
Declaration
public bool IsInteracted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This property helps distinguish between user-initiated focus events and programmatic focus calls, which can be useful for implementing different behaviors or analytics tracking.
Value
Gets or sets the current complete value of the SfOtpInput component.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the concatenated values from all input fields at the time of the focus event. |
Remarks
This value represents the current state of the entire OTP input, not just the focused field. For number-type inputs, this will contain only numeric characters.