Skip to content

Commit af1e613

Browse files
authored
Updates
1 parent cf456c8 commit af1e613

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

aspnetcore/blazor/components/render-modes.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ The <xref:Microsoft.AspNetCore.Components.ComponentBase.RendererInfo?displayProp
228228

229229
Components use these properties to render content depending on their location or interactivity status. The following examples demonstrate typical use cases.
230230

231-
Display content and disable a button until a component is interactive:
231+
Display content until a component is interactive:
232232

233233
```razor
234234
@if (!RendererInfo.IsInteractive)
@@ -237,23 +237,16 @@ Display content and disable a button until a component is interactive:
237237
}
238238
else
239239
{
240-
<ul id="messagesList">
241-
@foreach (var message in messages)
242-
{
243-
<li>@message</li>
244-
}
245-
</ul>
240+
...
241+
}
242+
```
246243

247-
<div class="form-group">
248-
<label>
249-
Message: <input @bind="messageInput" size="250" />
250-
</label>
251-
</div>
244+
Disable a button until a component is interactive:
252245

253-
<button @onclick="Send" disabled="@(chatState is null || !RendererInfo.IsInteractive)">
254-
Send
255-
</button>
256-
}
246+
```razor
247+
<button @onclick="Send" disabled="@(chatState is null || !RendererInfo.IsInteractive)">
248+
Send
249+
</button>
257250
```
258251

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

0 commit comments

Comments
 (0)