@@ -55,6 +55,12 @@ protected MudBaseInputExtended()
5555 /// </summary>
5656 [ Parameter ] public EventCallback OnChange { get ; set ; }
5757
58+ /// <summary>
59+ /// Gets or sets a callback that is invoked before input is processed.
60+ /// </summary>
61+ /// <remarks>Use this callback to perform custom logic or validation before the input event is
62+ /// handled. This can be useful for intercepting or modifying input behavior in advanced scenarios
63+ /// </remarks>
5864 [ Parameter ]
5965 public EventCallback < MudBeforeInputEventArgs > OnBeforeInput { get ; set ; }
6066
@@ -64,6 +70,12 @@ protected MudBaseInputExtended()
6470 [ Parameter ]
6571 public bool HasAdornmentStart { get ; set ; }
6672
73+ /// <summary>
74+ /// Gets or sets a value indicating whether the component has an adornment at the end.
75+ /// </summary>
76+ [ Parameter ]
77+ public bool HasAdornmentEnd { get ; set ; }
78+
6779 /// <summary>
6880 /// The Adornment if used. By default, it is set to None.
6981 /// </summary>
@@ -91,6 +103,12 @@ protected MudBaseInputExtended()
91103 [ Category ( CategoryTypes . FormComponent . Behavior ) ]
92104 public bool DisablePaste { get ; set ; }
93105
106+ /// <summary>
107+ /// Invokes logic to be executed before input is processed, including raising the BeforeInput event if a
108+ /// delegate is assigned.
109+ /// </summary>
110+ /// <param name="args">The event data associated with the before input operation.</param>
111+ /// <returns>A task that represents the asynchronous operation.</returns>
94112 protected async Task InvokeBeforeInputAsync ( MudBeforeInputEventArgs args )
95113 {
96114 _isFocused = true ;
@@ -127,20 +145,33 @@ protected override async Task OnConverterChangedAsync()
127145 /// <returns></returns>
128146 protected string ? ResolveAriaDescribedBy ( ) => GetAriaDescribedByString ( ) ;
129147
148+ /// <summary>
149+ ///
150+ /// </summary>
151+ /// <param name="dto"></param>
152+ /// <returns></returns>
130153 [ JSInvokable ( "OnBeforeInput" ) ]
131154 public async Task < bool > OnBeforeInputFromJs ( MudBeforeInputJsDto dto )
132155 {
133156 var args = new MudBeforeInputEventArgs
134157 {
135158 Data = dto . Data ,
136- InputType = dto . InputType ,
159+ InputType = dto . InputType ?? string . Empty ,
137160 IsComposing = dto . IsComposing
138161 } ;
139162
140163 await InvokeBeforeInputAsync ( args ) ;
141164 return args . PreventDefault ;
142165 }
143166
167+ /// <summary>
168+ /// Invoked before processing input, allowing for custom logic or validation to be performed asynchronously.
169+ /// </summary>
170+ /// <remarks>Override this method in a derived class to implement custom pre-processing or
171+ /// validation logic before input is handled. This method is called before the main input processing
172+ /// occurs.</remarks>
173+ /// <param name="args">An object containing event data for the input operation.</param>
174+ /// <returns>A task that represents the asynchronous operation. The default implementation returns a completed task.</returns>
144175 protected virtual Task OnBeforeInputAsync ( MudBeforeInputEventArgs args ) => Task . CompletedTask ;
145176
146177
0 commit comments