autofocus
Browse files
src/lib/components/Playground/Playground.svelte
CHANGED
@@ -207,7 +207,11 @@
|
|
207 |
{/if}
|
208 |
{#if !viewCode}
|
209 |
{#each messages as message, i}
|
210 |
-
<PlaygroundMessage
|
|
|
|
|
|
|
|
|
211 |
{/each}
|
212 |
|
213 |
<button
|
|
|
207 |
{/if}
|
208 |
{#if !viewCode}
|
209 |
{#each messages as message, i}
|
210 |
+
<PlaygroundMessage
|
211 |
+
{message}
|
212 |
+
on:delete={() => deleteMessage(i)}
|
213 |
+
autofocus={!loading && i === messages.length - 1}
|
214 |
+
/>
|
215 |
{/each}
|
216 |
|
217 |
<button
|