diff --git a/browser/main/Detail/FolderSelect.js b/browser/main/Detail/FolderSelect.js index 0b1b6a37..47fa6bad 100644 --- a/browser/main/Detail/FolderSelect.js +++ b/browser/main/Detail/FolderSelect.js @@ -200,6 +200,11 @@ class FolderSelect extends React.Component { let currentOption = options.filter((option) => option.storage.key === storageKey && option.folder.key === folderKey)[0] + if (this.state.search.trim().length > 0) { + let filter = new RegExp('^' + _.escapeRegExp(this.state.search), 'i') + options = options.filter((option) => filter.test(option.folder.name)) + } + let optionList = options .map((option, index) => { return ( diff --git a/browser/main/Detail/FolderSelect.styl b/browser/main/Detail/FolderSelect.styl index 41db7525..0abe6589 100644 --- a/browser/main/Detail/FolderSelect.styl +++ b/browser/main/Detail/FolderSelect.styl @@ -57,12 +57,13 @@ .search-optionList position fixed + max-height 450px + overflow auto z-index 200 background-color white border-radius 2px box-shadow 2px 2px 10px gray - .search-optionList-item height 34px width 250px