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

Conversation

harsh-tamr
Copy link
Contributor

@harsh-tamr harsh-tamr commented Sep 16, 2020

Fixes: #115

If your files look like
/a/b/c.txt, /a/b/d.txt, then you will get undefined for the folder calls because no folders have been defined.

If you have /a/, a/b/, /a/b/c.txt, /a/b/d.txt then you will get the folder you are looking for.

The problem lies in https://github.com/uptick/react-keyed-file-browser/blob/master/src/browser.js#L178
where .find is looking for an exact match in all the files.

I would argue that a user should not have to specify all the folders and if a prefix exists. The onSelect callback should return a folder with 0 for modified and size.

@harsh-tamr harsh-tamr changed the title Fixes 115 onSelectFolder returns folder from file path instead of undefined Sep 16, 2020
@harsh-tamr
Copy link
Contributor Author

@mwfister mwfister mentioned this pull request Sep 25, 2020
@mwfister mwfister merged commit 6027ed0 into uptick:master Sep 25, 2020
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.

On selection callback?

2 participants