File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
lib/components/FilePicker Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 2222 <div class =" file-picker__main" >
2323 <!-- Header title / file list breadcrumbs -->
2424 <FilePickerBreadcrumbs v-if =" currentView === 'files'"
25- :path =" currentPath"
25+ :path.sync =" currentPath"
2626 :show-menu =" allowPickDirectory"
27- @create-node =" onCreateFolder"
28- @update:path =" navigatedPath = $event" />
27+ @create-node =" onCreateFolder" />
2928 <div v-else class =" file-picker__view" >
3029 <h3 >{{ viewHeadline }}</h3 >
3130 </div >
@@ -212,10 +211,16 @@ watch([navigatedPath], () => {
212211/**
213212 * The current path that should be picked from
214213 */
215- const currentPath = computed (() =>
216- // Only use the path for the files view as favorites and recent only works on the root
217- currentView .value === ' files' ? navigatedPath .value || props .path || savedPath .value : ' /' ,
218- )
214+ const currentPath = computed ({
215+ get : () => {
216+ // Only use the path for the files view as favorites and recent only works on the root
217+ return currentView .value === ' files' ? navigatedPath .value || props .path || savedPath .value : ' /'
218+ },
219+ set : (path : string ) => {
220+ // forward setting the current path to the navigated path
221+ navigatedPath .value = path
222+ },
223+ })
219224
220225/**
221226 * A string used to filter files in current view
You can’t perform that action at this time.
0 commit comments