Skip to content

Commit f73a403

Browse files
committed
Don't enable submit comments button until some text has been entered
1 parent 3eb74a8 commit f73a403

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ProgrammerAl.Site/ProgrammerAl.Site/Components/PostFeedbackComponent.razor

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@using ProgrammerAl.Site.Components.AnimatedComponents
22
<div class="flex flex-col gap-2 border p-4 m-8">
33
<p class="font-semibold text-lg">If you have time, please provide anonymous feedback:</p>
4-
<textarea @bind=@Comments
4+
<textarea @bind-value="@Comments" @bind-value:event="oninput"
55
placeholder="Place feedback here..."
66
rows="4"
77
maxlength="2000"
@@ -17,7 +17,8 @@
1717
<button @onclick=@PostCommentsAsync
1818
class="p-2 w-2/5 place-self-center
1919
border border-2 border-green-800 rounded
20-
font-bold text-xl">
20+
font-bold text-xl"
21+
disabled=@(string.IsNullOrWhiteSpace(Comments) ? "true" : "false")>
2122
Submit Feedback
2223
</button>
2324
}

0 commit comments

Comments
 (0)