File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,6 @@ interface NoteButtonProps {
1919export default function NoteButton ( props : NoteButtonProps ) : ReactElement {
2020 const [ noteOpen , setNoteOpen ] = useState < boolean > ( false ) ;
2121
22- const handleClose = ( ) : void => {
23- setNoteOpen ( false ) ;
24- if ( props . onClick ) {
25- props . onClick ( ) ;
26- }
27- } ;
28-
2922 return (
3023 < >
3124 < IconButtonWithTooltip
@@ -53,7 +46,8 @@ export default function NoteButton(props: NoteButtonProps): ReactElement {
5346 open = { noteOpen }
5447 text = { props . noteText }
5548 titleId = { "addWords.addNote" }
56- close = { handleClose }
49+ close = { ( ) => setNoteOpen ( false ) }
50+ onExited = { props . onClick }
5751 updateText = { props . updateNote ?? ( ( ) => { } ) }
5852 buttonIdCancel = "note-edit-cancel"
5953 buttonIdClear = "note-edit-clear"
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ interface EditTextDialogProps {
2424 text : string ;
2525 titleId : string ;
2626 close : ( ) => void ;
27+ onExited ?: ( ) => void ;
2728 updateText : ( newText : string ) => void | Promise < void > ;
2829 buttonIdCancel ?: string ;
2930 buttonIdClear ?: string ;
@@ -90,6 +91,7 @@ export default function EditTextDialog(
9091 < Dialog
9192 open = { props . open }
9293 onClose = { escapeClose }
94+ TransitionProps = { { onExited : props . onExited } }
9395 aria-labelledby = "alert-dialog-title"
9496 aria-describedby = "alert-dialog-description"
9597 >
You can’t perform that action at this time.
0 commit comments