@@ -40,6 +40,7 @@ const FilesGridView = ({
4040 onEditIntent,
4141 title,
4242 selectedUsers,
43+ selectedTags,
4344 onAddAttachment,
4445 assetsMembers,
4546 isSharingAttachment,
@@ -106,12 +107,13 @@ const FilesGridView = ({
106107 }
107108 }
108109
109- const onAddingAttachmentPermissions = ( allowedUsers ) => {
110+ const onAddingAttachmentPermissions = ( allowedUsers , tags ) => {
110111 const { attachments, projectId } = pendingAttachments
111112 _ . forEach ( attachments , f => {
112113 const attachment = {
113114 ...f ,
114- allowedUsers
115+ allowedUsers,
116+ tags
115117 }
116118 onAddAttachment ( projectId , attachment )
117119 } )
@@ -195,6 +197,7 @@ const FilesGridView = ({
195197 onSubmit = { onAddingAttachmentPermissions }
196198 onChange = { onChangePermissions }
197199 selectedUsers = { selectedUsers }
200+ selectedTags = { selectedTags }
198201 projectMembers = { projectMembers }
199202 loggedInUser = { loggedInUser }
200203 isSharingAttachment = { isSharingAttachment }
@@ -207,8 +210,9 @@ const FilesGridView = ({
207210 ref = { ( comp ) => nameFieldRef = comp }
208211 title = "Name"
209212 setFilter = { setFilter }
210- filterName = "name"
211- value = { getFilterValue ( 'name' ) }
213+ type = "name"
214+ name = { getFilterValue ( 'name.name' ) }
215+ tag = { getFilterValue ( 'name.tag' ) }
212216 />
213217 </ div >
214218 < div styleName = "flex-item-title item-shared-with" >
@@ -241,8 +245,8 @@ const FilesGridView = ({
241245 const onDeleteCancel = ( ) => onDeleteIntent ( - 1 )
242246 const handleDeleteClick = ( ) => onDeleteIntent ( idx )
243247
244- const onEditConfirm = ( title , allowedUsers ) => {
245- onEdit ( link . id , title , allowedUsers )
248+ const onEditConfirm = ( title , allowedUsers , tags ) => {
249+ onEdit ( link , title , allowedUsers , tags )
246250 onEditIntent ( - 1 )
247251 }
248252 const onEditCancel = ( ) => onEditIntent ( - 1 )
@@ -303,7 +307,14 @@ const FilesGridView = ({
303307 < div styleName = "flex-item item-type" >
304308 < FileIcon type = { link . title . split ( '.' ) [ 1 ] } />
305309 </ div >
306- < div styleName = "flex-item item-name" > < p > { renderLink ( link ) } </ p > </ div >
310+ < div styleName = "flex-item item-name" >
311+ < div styleName = "item-name-tag-wrapper" >
312+ < p > { renderLink ( link ) } </ p >
313+ {
314+ link . tags && link . tags . map ( ( t , i ) => < span styleName = "tag" key = { i } > { t } </ span > )
315+ }
316+ </ div >
317+ </ div >
307318 < div styleName = "flex-item item-shared-with" >
308319 { renderSharedWith ( link ) }
309320 </ div >
@@ -338,6 +349,7 @@ FilesGridView.propTypes = {
338349 canEdit : PropTypes . bool ,
339350 links : PropTypes . array . isRequired ,
340351 selectedUsers : PropTypes . string ,
352+ selectedTags : PropTypes . arrayOf ( PropTypes . string ) ,
341353 projectMembers : PropTypes . object ,
342354 pendingAttachments : PropTypes . object ,
343355 onUploadAttachment : PropTypes . func ,
0 commit comments