Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

Conversation

oliverfoster
Copy link
Contributor

@oliverfoster oliverfoster commented Aug 13, 2020

resolve #133

Added

  • getFiles function to encapsulate the files part of the render function
  • getSelectedItems function to encapsulate the selectedItems part of the render function
  • canDownloadFolder and onDownloadFolder functions and their configs

Changed

  • handleActionBarDownloadClick function to check if the selection is a folder using new getFiles and getSelectedItems functions
  • render function uses the new getFiles and getSelectedItems functions
  • Switched to using utils.isFolder rather than a size === 0 comparison for folders

@oliverfoster
Copy link
Contributor Author

@jarekwg Is this feasible? Have you managed to take a look?

@jarekwg
Copy link
Member

jarekwg commented Aug 20, 2020

Hi @oliverfoster, sorry for the wait. I'll get one of my colleagues to take a look soon.

@oliverfoster
Copy link
Contributor Author

No worries, happy to amend if they've suggestions.

Copy link
Contributor

@jlo-1 jlo-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good just one comment to address before merge

@jlo-1 jlo-1 merged commit 4e0ecc6 into uptick:master Aug 25, 2020
@venky0195
Copy link

venky0195 commented Sep 25, 2020

Hi, @jarekwg @oliverfoster @olivermartinfoster onDownloadFolder not working.
I'm unable to download a folder. However, download files are working.
<FileBrowser
onDownloadFile={arrayOfSelectedItems => { console.log('downloadFile', arrayOfSelectedItems) }}
onDownloadFolder={(arrayOfSelectedFolders) => { console.log('downloadFolder', arrayOfSelectedFolders) }} />
I'm getting console for onDownloadFile, but no download button when I click on folder.
Thanks in advance

@venky0195
Copy link

Also, there is only below code in browser.js in node modules.
actionRenderer: ActionRenderer,
onCreateFolder, onRenameFile, onRenameFolder,
onDeleteFile, onDeleteFolder, onDownloadFile

There is no onDownloadFolder anywhere in the browser.js

@oliverfoster
Copy link
Contributor Author

These changes haven't been released yet. You'd have to use the master branch. Are you sure you have the code from this pr?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

request: canDownloadFolder and onDownloadFolder

5 participants