summaryrefslogtreecommitdiff
path: root/app/client/common/fileList.component.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-01-16 02:05:42 +0100
committerJules Laplace <julescarbon@gmail.com>2019-01-16 02:05:42 +0100
commit0b3dc585a0b02a3426b45f5cd474f81a31d5bd7b (patch)
tree1362d4d5cb92b7f36a2fac4f9c34dc2d42142009 /app/client/common/fileList.component.js
parent477947fe83a37e82bced4d8e060f374aba287eb0 (diff)
uprez ui
Diffstat (limited to 'app/client/common/fileList.component.js')
-rw-r--r--app/client/common/fileList.component.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/client/common/fileList.component.js b/app/client/common/fileList.component.js
index 12f6865..c4da4d7 100644
--- a/app/client/common/fileList.component.js
+++ b/app/client/common/fileList.component.js
@@ -17,7 +17,8 @@ export const FileList = props => {
orderBy='name asc',
className='',
fileListClassName='filelist',
- rowClassName='row file'
+ rowClassName='row file',
+ options,
} = props
const { mapFn, sortFn } = util.sort.orderByFn(orderBy)
let sortedFiles = (files || [])
@@ -36,6 +37,7 @@ export const FileList = props => {
linkFiles={linkFiles}
onDelete={onDelete}
onClick={onClick}
+ options={options}
/>
})
if (!fileList || !fileList.length) {
@@ -73,7 +75,7 @@ export const FileList = props => {
}
export const FileRow = props => {
- const { file, linkFiles, onDelete, onClick, className='row file', username='' } = props
+ const { file, linkFiles, onDelete, onClick, className='row file', username='', options } = props
const fields = fieldSet(props.fields)
const size = util.hush_size(file.size)
@@ -146,7 +148,7 @@ export const FileRow = props => {
{fields.has('delete') && onDelete && file.id &&
<div className='destroy' onClick={(e) => onDelete(file)}>x</div>
}
- {props.options && props.options(file)}
+ {options && props.options(file)}
</div>
)
}