@using Syncfusion.Blazor.InPlaceEditor
@using Syncfusion.Blazor.Inputs
<div>Changes = @Changes</div>
<div>Async Changes = @ChangesAsync</div>
<div>
<SfInPlaceEditor Mode=Syncfusion.Blazor.InPlaceEditor.RenderMode.Inline
EditableOn=Syncfusion.Blazor.InPlaceEditor.EditableType.Click
Type=Syncfusion.Blazor.InPlaceEditor.InputType.Text
TValue="string"
ShowButtons=true
Disabled=false
@bind-Value=@Name
SubmitOnEnter=true>
<EditorComponent>
<SfTextBox @bind-Value=@Name ValueChange="@ChangeNameField"></SfTextBox>
</EditorComponent>
@*<InPlaceEditorEvents ValueChange=@ChangeNameField TValue="string"></InPlaceEditorEvents>*@
</SfInPlaceEditor>
</div>
<div>
<SfInPlaceEditor Mode=Syncfusion.Blazor.InPlaceEditor.RenderMode.Inline
EditableOn=Syncfusion.Blazor.InPlaceEditor.EditableType.Click
Type=Syncfusion.Blazor.InPlaceEditor.InputType.Text
TValue="string"
ShowButtons=true
Disabled=false
@bind-Value=@NameAsync
SubmitOnEnter=true>
<EditorComponent>
<SfTextBox @bind-Value=@NameAsync ValueChange="@ChangeNameFieldAsync"></SfTextBox>
</EditorComponent>
@*<InPlaceEditorEvents ValueChange=@ChangeNameFieldAsync TValue="string"></InPlaceEditorEvents>*@
</SfInPlaceEditor>
</div>
@code {
public string Name { get; set; } = "test";
public string NameAsync { get; set; } = "test async";
public string TextboxName { get; set; } = "test";
public string TextboxNameAsync { get; set; } = "test async";
public int Changes = 0;
public int ChangesAsync = 0;
protected async Task ChangeNameFieldAsync(Syncfusion.Blazor.Inputs.ChangedEventArgs args)
{
await Task.Delay(10);
ChangesAsync++;
}
protected void ChangeNameField(Syncfusion.Blazor.Inputs.ChangedEventArgs args)
{
Changes++;
}
}
|
Did this ever get fixed?
Can you link me to any documentation on how to do it using InPlaceEditorEvents?
Or do we need to keep using the ValueChange on the SfTextBox?
Hi Jlwarranty,
You can use the ValueChange event in the corresponding components, for detecting each value changes when using as EditorComponent . Below it the documentation for the events in the In-place editor.
Documentation: https://blazor.syncfusion.com/documentation/in-place-editor/events
Regards,
Indrajith