File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 62
62
otherwise its original date </small >
63
63
</div >
64
64
}
65
- <button class =" btn btn-primary" type =" submit" >Submit</button >
65
+ <button class =" btn btn-primary" type =" submit" disabled = " @canSubmit " >Submit</button >
66
66
</EditForm >
67
67
</div >
68
68
<div class =" preview" >
99
99
100
100
private CreateNewModel model = new ();
101
101
102
+ private bool canSubmit = true ;
103
+
102
104
protected override void OnParametersSet ()
103
105
{
104
106
if (BlogPost == null )
120
122
121
123
private async Task OnValidBlogPostCreatedAsync ()
122
124
{
125
+ canSubmit = false ;
123
126
await OnBlogPostCreated .InvokeAsync (model .ToBlogPost ());
124
127
ClearModel ();
128
+ canSubmit = true ;
125
129
}
126
130
127
131
private void ClearModel ()
You can’t perform that action at this time.
0 commit comments