uptick/react-keyed-file-browser

Anyway to disable multiple selection

ziaulrehman40 opened this issue · 1 comments

Is there a built in way to disable multiple selection of files/folders(anything), there can be any reason to do so. We just need this functionality.

As a workaround in browser.js's renderActionBar method

renderActionBar(selectedItems) {
    // Disallow multiple items operations
    if (selectedItems && selectedItems.length > 1) return null

This hides action-bar if multiple items are selected.

I know this is rough patch, but I am already using complete copy of the library to customize some other behaviors, so it doesn't bite us. Posting here so it may help anyone else looking for same.