File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ export class NewBranchDialog extends React.Component<
136
136
paper : branchDialogClass
137
137
} }
138
138
open = { this . props . open }
139
- onClose = { this . props . onClose }
139
+ onClose = { this . _onClose }
140
140
aria-labelledby = "new-branch-dialog"
141
141
>
142
142
< div className = { titleWrapperClass } >
@@ -145,7 +145,7 @@ export class NewBranchDialog extends React.Component<
145
145
< ClearIcon
146
146
titleAccess = "Close this dialog"
147
147
fontSize = "small"
148
- onClick = { this . props . onClose }
148
+ onClick = { this . _onClose }
149
149
/>
150
150
</ button >
151
151
</ div >
@@ -191,7 +191,7 @@ export class NewBranchDialog extends React.Component<
191
191
type = "button"
192
192
title = "Close this dialog without creating a new branch"
193
193
value = "Cancel"
194
- onClick = { this . props . onClose }
194
+ onClick = { this . _onClose }
195
195
/>
196
196
< input
197
197
className = { classes ( buttonClass , createButtonClass ) }
@@ -312,6 +312,19 @@ export class NewBranchDialog extends React.Component<
312
312
} ) ;
313
313
}
314
314
315
+ /**
316
+ * Callback invoked upon closing the dialog.
317
+ *
318
+ * @param event - event object
319
+ */
320
+ private _onClose = ( ) : void => {
321
+ this . props . onClose ( ) ;
322
+ this . setState ( {
323
+ name : '' ,
324
+ filter : ''
325
+ } ) ;
326
+ } ;
327
+
315
328
/**
316
329
* Callback invoked upon a change to the menu filter.
317
330
*
You can’t perform that action at this time.
0 commit comments