@@ -399,7 +399,8 @@ export const ColumnTagsComp = (function () {
399
399
value = typeof value === "string" && value . split ( "," ) [ 1 ] ? value . split ( "," ) : value ;
400
400
const tags = _ . isArray ( value ) ? value : ( value . length ? [ value ] : [ ] ) ;
401
401
402
- const handleTagClick = ( tagText : string ) => {
402
+ const handleTagClick = ( e : React . MouseEvent , tagText : string ) => {
403
+ e . stopPropagation ( ) ;
403
404
const foundOption = tagOptions . find ( option => option . label === tagText ) ;
404
405
if ( foundOption && foundOption . onEvent ) {
405
406
foundOption . onEvent ( "click" ) ;
@@ -409,6 +410,13 @@ export const ColumnTagsComp = (function () {
409
410
props . onEvent ( "click" ) ;
410
411
}
411
412
} ;
413
+
414
+ const handleTagWrapperClick = ( e : React . MouseEvent ) => {
415
+ e . stopPropagation ( ) ;
416
+ if ( props . onEvent ) {
417
+ props . onEvent ( "click" ) ;
418
+ }
419
+ } ;
412
420
413
421
const view = tags . map ( ( tag , index ) => {
414
422
// The actual eval value is of type number or boolean
@@ -418,20 +426,27 @@ export const ColumnTagsComp = (function () {
418
426
const tagStyle = getTagStyle ( tagText , tagOptions ) ;
419
427
420
428
return (
421
- < div key = { `${ tag . split ( ' ' ) . join ( '_' ) } -${ index } ` } >
429
+ < React . Fragment key = { `${ tag . split ( ' ' ) . join ( '_' ) } -${ index } ` } >
422
430
< TagStyled
423
431
color = { tagColor }
424
432
icon = { tagIcon }
425
433
key = { index }
426
434
style = { tagStyle }
427
- onClick = { ( ) => handleTagClick ( tagText ) }
435
+ onClick = { ( e ) => handleTagClick ( e , tagText ) }
428
436
>
429
437
{ tagText }
430
438
</ TagStyled >
431
- </ div >
439
+ </ React . Fragment >
432
440
) ;
433
441
} ) ;
434
- return view ;
442
+ return (
443
+ < div
444
+ style = { { width : '100%' , height : '100%' , minHeight : '22px' } }
445
+ onClick = { handleTagWrapperClick }
446
+ >
447
+ { view }
448
+ </ div >
449
+ ) ;
435
450
} ,
436
451
( nodeValue ) => {
437
452
const text = nodeValue . text . value ;
0 commit comments