File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 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 {
6262 if ( ! this . props . disabled ) {
6363 onClick = ( ) => {
6464 this . setState ( { open : true } ) ;
65+ this . props . setCurrent ( null ) ;
6566 } ;
6667 }
6768 return (
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ let BrowserToolbar = ({
9292 let menu = null ;
9393 if ( relation ) {
9494 menu = (
95- < BrowserMenu title = 'Edit' icon = 'edit-solid' >
95+ < BrowserMenu title = 'Edit' icon = 'edit-solid' setCurrent = { setCurrent } >
9696 < MenuItem
9797 text = { `Create ${ relation . targetClassName } and attach` }
9898 onClick = { onAddRow }
@@ -111,7 +111,7 @@ let BrowserToolbar = ({
111111 ) ;
112112 } else if ( onAddRow ) {
113113 menu = (
114- < BrowserMenu title = 'Edit' icon = 'edit-solid' disabled = { isUnique } >
114+ < BrowserMenu title = 'Edit' icon = 'edit-solid' disabled = { isUnique } setCurrent = { setCurrent } >
115115 < MenuItem text = 'Add a row' onClick = { onAddRow } />
116116 < MenuItem text = 'Add a row with modal' onClick = { onAddRowWithModal } />
117117 { enableColumnManipulation ? < MenuItem text = 'Add a column' onClick = { onAddColumn } /> : < noscript /> }
You can’t perform that action at this time.
0 commit comments