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

Components become invisible on adding in modal/drawer#724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletionsclient/packages/lowcoder/src/layout/gridLayout.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -172,12 +172,25 @@ class GridLayout extends React.Component<GridLayoutProps, GridLayoutState> {
}

componentDidUpdate(prevProps:GridLayoutProps,prevState:GridLayoutState){
constuiLayout=this.getUILayout();
if(!draggingUtils.isDragging()){
// log.debug("render. clear ops. layout: ", uiLayout);
// only change in changeHs, don't change state
if(_.size(this.state.ops)>0){
this.setState({layout:uiLayout,changedHs:undefined,ops:undefined});
// temporary fix for components becomes invisible in drawer/modal
// TODO: find a way to call DELETE_ITEM operation after layouts are updated in state
constops=[...this.state.opsasany[]];
const[firstOp]=ops;
const{ droppingItem}=this.props;
if(
ops.length===1
&&firstOp.type==='DELETE_ITEM'
&&firstOp.key===droppingItem?.i
){
this.setState({changedHs:undefined,ops:undefined});
}else{
constuiLayout=this.getUILayout();
this.setState({layout:uiLayout,changedHs:undefined,ops:undefined})
}
}
}
if(!draggingUtils.isDragging()&&_.isNil(this.state.ops)){
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp