-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DragDropFiles Control and integration with ListView and FilePicker v3 #861
DragDropFiles Control and integration with ListView and FilePicker v3 #861
Conversation
Hi @AJIXuMuK receive message the branch was changed, Thank you for your attention. |
Hi @aaclage, The branch has been changed as I merged a PR into the branch. So your PR is still valid and valuable for I believe @joelfmrodrigues reviewed your PR for |
Thank you @AJIXuMuK for the feedback. |
@aaclage just some minor things: |
private displayFileNames = (filesResult) => { | ||
const result = []; | ||
for (var i = 0; i < filesResult.length; i++) { | ||
result.push(<div className={styles.localTabFilename}>{filesResult[i].name}</div>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This loop is generating a warning in the browser console as the repeated elements don't have a key property
result.push(<div className={styles.localTabFilename}>{filesResult[i].name}</div>); | |
result.push(<div key={i.toString()} className={styles.localTabFilename}>{filesResult[i].name}</div>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aaclage I have just added the key
property to the version in dev-v2 branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joelfmrodrigues already making the changes.
yes, making the change. |
@joelfmrodrigues updated "Rename to MultipleUploadFilePickerTab" version for revision. |
@aaclage this is now merged. Many thanks! |
Thank you @joelfmrodrigues :), one small missing detail is to include PR in "Milestone" 3.1.0 . |
@aaclage it won't be missed without milestone anyway :) |
What's in this Pull Request?
Update to V3 version.
This new control allows to drag and drop files in pre defined areas.
This control has High impact in following controls ListView and FilePicker since they were changed/added to adapt this new control.
If additional tests or revision need to be made please advise.
This control has the following features that provide enhance and adaptability to existing controls.
- https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/dropEffect
- New property "fullPath" was included in file object to allow identify dropped files based on Folders, this allow users to create associated folder path by code (defensive code included https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem/webkitGetAsEntry)
Sample code:
Simple Sample view:
![image](https://user-images.githubusercontent.com/8522348/113166302-ef95c980-9242-11eb-9484-2c0a7cbfd85c.png)
Embedded and integrated with ListView:
![image](https://user-images.githubusercontent.com/8522348/113166221-d8ef7280-9242-11eb-89fd-38c5486e53fb.png)
Embedded and integrated with FilePicker:
![image](https://user-images.githubusercontent.com/8522348/113166117-c1b08500-9242-11eb-89b4-eed4aa45c634.png)