I use the way described here https://blazor.syncfusion.com/documentation/in-place-editor/how-to/dynamic-edit-mode to enable edit mode where the value is null initially:
@bind-EnableEditMode="@EditModeEnabled"
Everything works well.
I have AutoComplete component inside the in-place editor, and I would like to turn off edit mode of editor when the value is selected. I set the variable to EditModeEnabled = false and nothing was happened. I tried to use StateHasChanged() and InvokeAsync(StateHasChanged), but the edit mode did not turned off anyway.
Please, check
| <SfInPlaceEditor EnableEditMode="EditModeEnable" Type="Syncfusion.Blazor.InPlaceEditor.InputType.AutoComplete" @bind-Value="@AutoValue" Mode="@Mode" TValue="string">
<EditorComponent>
<SfAutoComplete TValue="string" TItem="Countries" @bind-Value="@AutoValue" DataSource="@Country" Autofill=true>
<AutoCompleteFieldSettings Value="Name"></AutoCompleteFieldSettings>
<AutoCompleteEvents TValue="string" TItem="Countries" OnValueSelect="onSelect"></AutoCompleteEvents>
</SfAutoComplete>
</EditorComponent> </SfInPlaceEditor>@code { public bool EditModeEnable { get; set; } = true;
public void onSelect()
{
this.EditModeEnable = false;
this.StateHasChanged(); }} |
Hi Vinitha,
Your sample does not work well. It shuts down in-place editor once the first time, but all next selections it does not work.
I use NET6 and the in-place editor with autocomplete is wrapped into separate component, which invoke valuechanged on each selection, it could affect also.
Hi,
Exactly with this patch release another trouble with in-line editor was popped out. I think that solution of this request influenced for the new issue. I have described it in the yesterdays message " Editor cancel editing on OnInput event ". Please, check.