Skip to content

Commit

Permalink
fix(snippets): focus snippet name by add new snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov committed Apr 6, 2022
1 parent 7f772c4 commit e2e4ff3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/renderer/components/snippets/SnippetListHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</template>

<script setup lang="ts">
import { emitter } from '@/composable'
import { useFolderStore } from '@/store/folders'
import { useSnippetStore } from '@/store/snippets'
Expand All @@ -25,6 +26,8 @@ const onAddNewSnippet = async () => {
await snippetStore.addNewSnippet()
await snippetStore.getSnippetsByFolderIds(folderStore.selectedIds!)
await snippetStore.getSnippets()
emitter.emit('focus:snippet-name', true)
}
</script>

Expand Down

0 comments on commit e2e4ff3

Please sign in to comment.