File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
src/client/containers/Modals Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,23 @@ class AddTagsModal extends React.Component {
5757 } )
5858 }
5959
60+ onClearClicked ( ) {
61+ axios
62+ . put ( `/api/v1/tickets/${ this . props . ticketId } ` , {
63+ tags : [ ]
64+ } )
65+ . then ( ( ) => {
66+ $ ( this . select )
67+ . val ( '' )
68+ . trigger ( 'chosen:updated' )
69+ this . props . socket . emit ( TICKETS_UI_TAGS_UPDATE , { ticketId : this . props . ticketId } )
70+ } )
71+ . catch ( error => {
72+ Log . error ( error )
73+ helpers . UI . showSnackbar ( error , true )
74+ } )
75+ }
76+
6077 render ( ) {
6178 const mappedTags =
6279 this . props . tagsSettings . tags &&
@@ -99,7 +116,14 @@ class AddTagsModal extends React.Component {
99116 </ div >
100117
101118 < div className = 'left' style = { { marginTop : 15 } } >
102- < Button type = { 'button' } text = { 'Clear' } small = { true } flat = { true } style = { 'danger' } />
119+ < Button
120+ type = { 'button' }
121+ text = { 'Clear' }
122+ small = { true }
123+ flat = { true }
124+ style = { 'danger' }
125+ onClick = { e => this . onClearClicked ( e ) }
126+ />
103127 </ div >
104128 < div className = 'right' style = { { marginTop : 15 } } >
105129 < Button
You can’t perform that action at this time.
0 commit comments