ywana-core8 0.0.902 → 0.0.903
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +8 -8
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +8 -8
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentViewer.js +0 -6
- package/src/widgets/explorer/Explorer.js +7 -2
- package/src/widgets/explorer/Explorer.test.js +2 -1
package/package.json
CHANGED
@@ -6,9 +6,6 @@ import './ContentViewer.css'
|
|
6
6
|
|
7
7
|
/**
|
8
8
|
* Content Viewer
|
9
|
-
*
|
10
|
-
* @param {*} props
|
11
|
-
* @returns
|
12
9
|
*/
|
13
10
|
export const ContentViewer = (props) => {
|
14
11
|
|
@@ -39,9 +36,6 @@ export const ContentViewer = (props) => {
|
|
39
36
|
|
40
37
|
/**
|
41
38
|
* Field Viewer
|
42
|
-
*
|
43
|
-
* @param {} props
|
44
|
-
* @returns
|
45
39
|
*/
|
46
40
|
const FieldViewer = (props) => {
|
47
41
|
|
@@ -7,7 +7,7 @@ import './Explorer.css'
|
|
7
7
|
*/
|
8
8
|
export const FileExplorer = (props) => {
|
9
9
|
|
10
|
-
const { columns, files = [], onSelectFile, folders = [], onSelectFolder, defaultView = "grid", defaultFolder, filterableColumns = false } = props
|
10
|
+
const { columns, files = [], onSelectFile, folders = [], onSelectFolder, defaultView = "grid", defaultFolder, filterableColumns = false, searchBy=[] } = props
|
11
11
|
const [selectedFolder, setSelectedFolder] = useState()
|
12
12
|
const [selectedFile, setSelectedFile] = useState()
|
13
13
|
const [search, setSearch] = useState()
|
@@ -36,7 +36,12 @@ export const FileExplorer = (props) => {
|
|
36
36
|
setSearch(value)
|
37
37
|
}
|
38
38
|
|
39
|
-
const filteredFiles = search ? files.filter(file =>
|
39
|
+
const filteredFiles = search ? files.filter(file => {
|
40
|
+
const serchByValues = searchBy.map(key => file[key])
|
41
|
+
const searchByString = serchByValues.join(' ')
|
42
|
+
return searchByString.toLowerCase().includes(search.toLowerCase())
|
43
|
+
}) : files
|
44
|
+
|
40
45
|
const selectedFiles = filteredFiles.filter(file => file.folder === selectedFolder)
|
41
46
|
|
42
47
|
return (
|