I have copied https://blazor.syncfusion.com/documentation/kanban/getting-started and addapted a bit to show my problem. Index.razor:
See code down below.
My issue is that I can edit text in the input box, but can not add spaces.
How can I fix this?
Thank you for your quick response. But requiring the users to know that is a big ask. Can we make is so that they can use the space bar like they are used to?
|
<SfKanban>
<KanbanCardSettings HeaderField="ObjectId" ContentField="ShortNote">
<Template>
@{
TasksModel task = (TasksModel)context;
<input id="input1" @bind="task.Summary" type="text" />
}
</Template>
</KanbanCardSettings>
</SfKanban>
@code {
[Inject]
IJSRuntime JsRuntime { get; set; }
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await JsRuntime.InvokeVoidAsync("Kanban.createKanbanEvent");
}
}
} |
|
window.Kanban = {
createKanbanEvent: function () {
var element = document.getElementById("input1");
element.addEventListener('keydown', this.kanbanKeyDown);
},
kanbanKeyDown: function (e) {
e.stopPropagation();
}
} |