File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " react-tag-input-component" ,
33 "description" : " lightweight component for tag(s) input" ,
4- "version" : " 1.0.2 " ,
4+ "version" : " 1.0.3 " ,
55 "license" : " MIT" ,
66 "author" : " Harsh Zalavadiya" ,
77 "module" : " dist/react-tag-input-component.esm.js" ,
Original file line number Diff line number Diff line change @@ -30,12 +30,19 @@ const tagStyles = css({
3030} ) ;
3131
3232export default function Tag ( { text, remove } : TagProps ) {
33- const handleOnRemove = ( ) => remove ( text ) ;
33+ const handleOnRemove = e => {
34+ e . stopPropagation ( ) ;
35+ remove ( text ) ;
36+ } ;
3437
3538 return (
3639 < span className = { cc ( "rti--tag" , tagStyles ) } >
3740 < span > { text } </ span >
38- < button onClick = { handleOnRemove } aria-label = { `remove ${ text } ` } >
41+ < button
42+ type = "button"
43+ onClick = { handleOnRemove }
44+ aria-label = { `remove ${ text } ` }
45+ >
3946 ✕
4047 </ button >
4148 </ span >
You can’t perform that action at this time.
0 commit comments