Skip to content

Commit 4d16626

Browse files
authored
Adjust examples (#3280)
Autofocus when editing, and update text to match example code.
1 parent bc7a6b8 commit 4d16626

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

www/content/examples/bulk-update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ values in the form submission (`POST` request):
3030
</tbody>
3131
</table>
3232
<input type="submit" value="Bulk Update" class="btn primary">
33-
<span id="toast"></span>
33+
<output id="toast"></output>
3434
</form>
3535
```
3636

www/content/examples/edit-row.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Finally, here is what the row looks like when the data is being edited:
7171

7272
```html
7373
<tr hx-trigger='cancel' class='editing' hx-get="/contact/${contact.id}">
74-
<td><input name='name' value='${contact.name}'></td>
74+
<td><input autofocus name='name' value='${contact.name}'></td>
7575
<td><input name='email' value='${contact.email}'></td>
7676
<td>
7777
<button class="btn danger" hx-get="/contact/${contact.id}">
@@ -183,7 +183,7 @@ this makes things a bit nicer to deal with.
183183

184184
function editTemplate(contact) {
185185
return `<tr hx-trigger='cancel' class='editing' hx-get="/contact/${contact.id}">
186-
<td><input name='name' value='${contact.name}'</td>
186+
<td><input autofocus name='name' value='${contact.name}'</td>
187187
<td><input name='email' value='${contact.email}'</td>
188188
<td>
189189
<button class="btn danger" hx-get="/contact/${contact.id}">

0 commit comments

Comments
 (0)