Folder picker



  • Hi,

    I noticed that there is a new File picker control, thank you very much for it. But I could not find a folder picker. Is there such a control? If yes, which one is it? If not, how can I create one of my own?

    My need is related to an Electron app, but I can see this being used in other browser based apps as well.



  • A convienient although inelegant way to achieve your objective is to select a file in the desired folder and derive folder from the path element returned:
    <!-- select folder by getting file and derive folder -->
    <div class=“q-pa-sm”>
    <q-file v-model=“mypathobj”
    label=“Select a file in the desired Directory”
    filled
    @input=“gotInput”
    style=“max-width: 400px”
    />
    </div>

    gotInput: function() {
      this.mypath = this.mypathobj.path.replace(this.mypathobj.name, '')
      console.log("Folder Path: ", this.mypath)
    },

Log in to reply