File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
aspnetcore/blazor/components Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -237,14 +237,23 @@ Display content and disable a button until a component is interactive:
237237}
238238else
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
250259A form can be disabled during prerendering and enabled when the component becomes interactive:
You can’t perform that action at this time.
0 commit comments