Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e5f73c

Browse files
authored
Merge pull requestlowcoder-org#724 from raheeliftikhar5/fix_modal_comps_invisible
Components become invisible on adding in modal/drawer
2 parentseb3854b +8d6bf63 commit5e5f73c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

‎client/packages/lowcoder/src/layout/gridLayout.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,25 @@ class GridLayout extends React.Component<GridLayoutProps, GridLayoutState> {
172172
}
173173

174174
componentDidUpdate(prevProps:GridLayoutProps,prevState:GridLayoutState){
175-
constuiLayout=this.getUILayout();
176175
if(!draggingUtils.isDragging()){
177176
// log.debug("render. clear ops. layout: ", uiLayout);
178177
// only change in changeHs, don't change state
179178
if(_.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+
constops=[...this.state.opsasany[]];
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+
constuiLayout=this.getUILayout();
192+
this.setState({layout:uiLayout,changedHs:undefined,ops:undefined})
193+
}
181194
}
182195
}
183196
if(!draggingUtils.isDragging()&&_.isNil(this.state.ops)){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp