Skip to content

Commit

Permalink
fix(files): Open new file when created from template
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Mar 1, 2024
1 parent e0705f1 commit f669f57
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion apps/files/src/views/TemplatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,13 @@ export default defineComponent({

// Update files list
emit('files:node:created', node)
emit('files:node:focus', node)

// Open the new file
window.OCP.Files.Router.goToRoute(
null, // use default route
{ view: 'files', fileid: node.fileid },
{ dir: node.dirname, openfile: 'true' },
)

// Close the picker
this.close()
Expand Down
3 changes: 3 additions & 0 deletions dist/2382-2382.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/2382-2382.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit f669f57

Please sign in to comment.