Skip to content

Commit cf456c8

Browse files
authored
Updates
1 parent 63c23d1 commit cf456c8

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

aspnetcore/blazor/components/render-modes.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,23 @@ Display content and disable a button until a component is interactive:
237237
}
238238
else
239239
{
240-
// Code to display chatbot messages
241-
}
240+
<ul id="messagesList">
241+
@foreach (var message in messages)
242+
{
243+
<li>@message</li>
244+
}
245+
</ul>
242246
243-
...
247+
<div class="form-group">
248+
<label>
249+
Message: <input @bind="messageInput" size="250" />
250+
</label>
251+
</div>
244252
245-
<button ... disabled="@(chatState is null || !RendererInfo.IsInteractive)">
246-
Send
247-
</button>
253+
<button @onclick="Send" disabled="@(chatState is null || !RendererInfo.IsInteractive)">
254+
Send
255+
</button>
256+
}
248257
```
249258

250259
A form can be disabled during prerendering and enabled when the component becomes interactive:

0 commit comments

Comments
 (0)