@@ -172,12 +172,25 @@ class GridLayout extends React.Component<GridLayoutProps, GridLayoutState> {
172172}
173173
174174componentDidUpdate ( prevProps :GridLayoutProps , prevState :GridLayoutState ) {
175- const uiLayout = this . getUILayout ( ) ;
176175if ( ! draggingUtils . isDragging ( ) ) {
177176// log.debug("render. clear ops. layout: ", uiLayout);
178177// only change in changeHs, don't change state
179178if ( _ . size ( this . state . ops ) > 0 ) {
180- this . setState ( { layout :uiLayout , changedHs :undefined , ops :undefined } ) ;
179+ // temporary fix for components becomes invisible in drawer/modal
180+ // TODO: find a way to call DELETE_ITEM operation after layouts are updated in state
181+ const ops = [ ...this . state . ops as any [ ] ] ;
182+ const [ firstOp ] = ops ;
183+ const { droppingItem} = this . props ;
184+ if (
185+ ops . length === 1
186+ && firstOp . type === 'DELETE_ITEM'
187+ && firstOp . key === droppingItem ?. i
188+ ) {
189+ this . setState ( { changedHs :undefined , ops :undefined } ) ;
190+ } else {
191+ const uiLayout = this . getUILayout ( ) ;
192+ this . setState ( { layout :uiLayout , changedHs :undefined , ops :undefined } )
193+ }
181194}
182195}
183196if ( ! draggingUtils . isDragging ( ) && _ . isNil ( this . state . ops ) ) {