File/Folder icon or image in the content explorer Grid View is not selectable.
- Dominant language
- TypeScript
- Stars
- 551
- Forks
- 351
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 31
Description
Issue : File/Folder icon or image in the content explorer Grid View is not selectable.
Steps to reproduce the issue:
1) Try the example available in box documentation https://developer.box.com/guides/embed/ui-elements/explorer/.
Code pen : https://codepen.io/box-platform/pen/wdWWdN
2) Change the view mode to Grid View
3) Now try to click on folder or file icon and the item is not clickable or selectable. But the same is working on list view.
We use the 'select' listener/event of content explorer to our own action and it is stopping us in Grid View mode.
Solution / Fix:
I looked at the src of ItemGridCell.js (https://github.com/box/box-ui-elements/blob/3a1ee3d7e57531d3df8e6a87a991fb53a723f5d5/src/elements/content-explorer/ItemGridCell.js) and found that onItemSelect={onItemSelect} is not added either at top level or . Please move the onItemSelect={onItemSelect} to top level or add this to and this will resolve the problem.
Note: We are using plain javascript to consume box ui elements in our project (not reactjs component). Please add the fix to the library and let me know once cdn links are rolled out for this.
Thanks,
Pandi Murugan A
Contributor guide
Assessment
This issue has not been assessed yet.