File tree 2 files changed +3
-2
lines changed 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export default class BrowserMenu extends React.Component {
62
62
if ( ! this . props . disabled ) {
63
63
onClick = ( ) => {
64
64
this . setState ( { open : true } ) ;
65
+ this . props . setCurrent ( null ) ;
65
66
} ;
66
67
}
67
68
return (
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ let BrowserToolbar = ({
92
92
let menu = null ;
93
93
if ( relation ) {
94
94
menu = (
95
- < BrowserMenu title = 'Edit' icon = 'edit-solid' >
95
+ < BrowserMenu title = 'Edit' icon = 'edit-solid' setCurrent = { setCurrent } >
96
96
< MenuItem
97
97
text = { `Create ${ relation . targetClassName } and attach` }
98
98
onClick = { onAddRow }
@@ -111,7 +111,7 @@ let BrowserToolbar = ({
111
111
) ;
112
112
} else if ( onAddRow ) {
113
113
menu = (
114
- < BrowserMenu title = 'Edit' icon = 'edit-solid' disabled = { isUnique } >
114
+ < BrowserMenu title = 'Edit' icon = 'edit-solid' disabled = { isUnique } setCurrent = { setCurrent } >
115
115
< MenuItem text = 'Add a row' onClick = { onAddRow } />
116
116
< MenuItem text = 'Add a row with modal' onClick = { onAddRowWithModal } />
117
117
{ enableColumnManipulation ? < MenuItem text = 'Add a column' onClick = { onAddColumn } /> : < noscript /> }
You can’t perform that action at this time.
0 commit comments