@@ -56,21 +56,24 @@ export const DocumentsGraphqlTable = ({gqlQuery,apolloClient,tableConfig, type,
5656 }
5757 }
5858
59- const deleteAction = ( row ) => {
59+ const deleteAction = ( evt , row ) => {
60+ evt . stopPropagation ( )
6061 if ( onDeleteButtonClick ) {
6162 const rowTmp = row && row . original ? { label :row . original . name , id :row . original . fullID } : { }
6263 onDeleteButtonClick ( rowTmp )
6364 }
6465 }
6566
66- const viewAction = ( row ) => {
67+ const viewAction = ( evt , row ) => {
68+ evt . stopPropagation ( )
6769 if ( onViewButtonClick ) {
6870 const rowTmp = row && row . original ? { label :row . original . name , id :row . original . fullID } : { }
6971 onViewButtonClick ( rowTmp )
7072 }
7173 }
7274
73- const editAction = ( row ) => {
75+ const editAction = ( evt , row ) => {
76+ evt . stopPropagation ( )
7477 if ( onEditButtonClick ) {
7578 const rowTmp = row && row . original ? { label :row . original . name , id :row . original . fullID } : { }
7679 onEditButtonClick ( rowTmp )
@@ -83,13 +86,13 @@ export const DocumentsGraphqlTable = ({gqlQuery,apolloClient,tableConfig, type,
8386 //const name = cell.row.original['name']
8487 return < React . Fragment >
8588 < span className = "d-flex justify-content-end mr-4" >
86- { onViewButtonClick && < Button variant = "success" size = "sm" className = "ml-3" title = { `view document` } onClick = { ( ) => viewAction ( invFullId ) } >
89+ { onViewButtonClick && < Button variant = "success" size = "sm" className = "ml-3" title = { `view document` } onClick = { ( evt ) => viewAction ( evt , invFullId ) } >
8790 < HiOutlineDocument />
8891 </ Button > }
89- { onEditButtonClick && < Button variant = "success" size = "sm" className = "ml-3" title = { `edit document` } onClick = { ( ) => editAction ( invFullId ) } >
92+ { onEditButtonClick && < Button variant = "success" size = "sm" className = "ml-3" title = { `edit document` } onClick = { ( evt ) => editAction ( evt , invFullId ) } >
9093 < RiEdit2Fill />
9194 </ Button > }
92- { onDeleteButtonClick && < Button variant = "danger" size = "sm" className = "ml-3" title = { `delete document` } onClick = { ( ) => deleteAction ( invFullId ) } >
95+ { onDeleteButtonClick && < Button variant = "danger" size = "sm" className = "ml-3" title = { `delete document` } onClick = { ( evt ) => deleteAction ( evt , invFullId ) } >
9396 < RiDeleteBin7Line />
9497 </ Button > }
9598 </ span >
0 commit comments