Skip to content

Commit

Permalink
Merge pull request #19555 from davelopez/24.0_fix_export_remote_tool_…
Browse files Browse the repository at this point in the history
…dialog

[24.2] Fix "export datasets" tool displaying dialog right away
  • Loading branch information
mvdbeek authored Feb 7, 2025
2 parents e3b1795 + ec4aa2b commit 5c121b4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion client/src/components/FilesDialog/FilesDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ interface FilesDialogProps {
requireWritable?: boolean;
/** Optional selected item to start browsing from */
selectedItem?: SelectionItem;
/** Whether the dialog is visible at the start */
isOpen?: boolean;
}
const props = withDefaults(defineProps<FilesDialogProps>(), {
Expand All @@ -54,6 +56,7 @@ const props = withDefaults(defineProps<FilesDialogProps>(), {
multiple: false,
requireWritable: false,
selectedItem: undefined,
isOpen: true,
});
const { config, isConfigLoaded } = useConfig();
Expand All @@ -66,7 +69,7 @@ const errorMessage = ref<string>();
const filter = ref();
const items = ref<SelectionItem[]>([]);
const itemsProvider = ref<ItemsProvider>();
const modalShow = ref(true);
const modalShow = ref(props.isOpen);
const optionsShow = ref(false);
const undoShow = ref(false);
const hasValue = ref(false);
Expand Down
11 changes: 10 additions & 1 deletion client/src/components/Form/Elements/FormDirectory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
<b-button id="select-btn" @click="reset">
<FontAwesomeIcon icon="folder-open" /> {{ selectText }}
</b-button>
<FilesDialog :key="modalKey" mode="directory" :callback="setUrl" :require-writable="true" />
<FilesDialog
:key="modalKey"
mode="directory"
:callback="setUrl"
:require-writable="true"
:is-open="isModalShown" />
</div>
<b-breadcrumb v-if="url">
<b-breadcrumb-item title="Select another folder" class="align-items-center" @click="reset">
Expand Down Expand Up @@ -69,6 +74,9 @@ export default {
return regex.test(this.currentDirectoryName);
},
},
mounted() {
this.updateURL(true);
},
methods: {
removePath(index) {
this.pathChunks = this.pathChunks.slice(0, index);
Expand All @@ -83,6 +91,7 @@ export default {
// https://michaelnthiessen.com/force-re-render/
redrawModal() {
this.modalKey += 1;
this.isModalShown = true;
},
removeLastPath(event) {
// check whether the last item is editable
Expand Down

0 comments on commit 5c121b4

Please sign in to comment.