Skip to content

Commit bd2ddb3

Browse files
committed
Added OnChange rendering in create new blogpost
1 parent cc8accc commit bd2ddb3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

LinkDotNet.Blog.Web/Shared/Admin/CreateNewBlogPost.razor

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@
1010
<ValidationSummary />
1111
<div class="mb-3">
1212
<label for="title">Title</label>
13-
<InputText class="form-control" id="title" @bind-Value="model.Title" />
13+
<InputText class="form-control" id="title" @bind-Value="model.Title"
14+
@oninput="args => model.Title = args.Value.ToString()"/>
1415
</div>
1516
<div class="mb-3">
1617
<label for="short">Short Description</label>
17-
<InputTextArea class="form-control" id="short" @bind-Value="model.ShortDescription" rows="4"/>
18+
<InputTextArea class="form-control" id="short" @bind-Value="model.ShortDescription" rows="4"
19+
@oninput="args => model.ShortDescription = args.Value.ToString()"/>
1820
<small id="short" class="form-text text-muted">You can use markdown to style your component.</small>
1921
</div>
2022
<div class="mb-3">
2123
<label for="content">Content</label>
22-
<InputTextArea class="form-control" id="content" @bind-Value="model.Content" rows="10" />
24+
<InputTextArea class="form-control" id="content" @bind-Value="model.Content" @oninput="args => model.Content = args.Value.ToString()" rows="10" />
2325
<small id="content" class="form-text text-muted">You can use markdown to style your component. Additional features are listed <a @onclick="@(() => FeatureDialog.Open())">here</a></small>
2426
@* <small id="content" class="form-text text-muted">Drag and drop images to upload and insert picture.</small> *@
2527
</div>

0 commit comments

Comments
 (0)