Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dragged from outside and allowOverlap=true #1649

Closed
qqjiandj123 opened this issue Jan 18, 2022 · 6 comments · May be fixed by #1704
Closed

dragged from outside and allowOverlap=true #1649

qqjiandj123 opened this issue Jan 18, 2022 · 6 comments · May be fixed by #1704
Labels
stale The label to apply when a pull request or an issue is stale

Comments

@qqjiandj123
Copy link

If dragged from outside into react-gird-layout, it will trigger reordering, when I set compactType=null, allowOverlap=true, isDroppable=true

@qqjiandj123 qqjiandj123 changed the title dragged from outside and allowOverlay=true dragged from outside and allowOverlap=true Jan 18, 2022
@qqjiandj123
Copy link
Author

I have already set preventCollision=true

@qqjiandj123
Copy link
Author

Hi Bro can you help me to vertify this problem? @ @torkelo @bryantsai @betalb @ericgibb

@qqjiandj123
Copy link
Author

It seems that every time the rendering is initialized, the default sorting method is vertical, not null, and the compactType passed by props is not used.

@qqjiandj123
Copy link
Author

<GridLayout className="layout" cols={48} useCSSTransforms={true} isBounded={false} allowOverlap={true} preventCollision={true} compactType={null} > {this.renderGrid(layout)} </GridLayout>

@SunriseWiLL
Copy link

cause by the function compactItem did not consider the compactType={null} condition:

    if (compactH) {
      resolveCompactionCollision(fullLayout, l, collides.x + collides.w, "x");
    } else {
      resolveCompactionCollision(fullLayout, l, collides.y + collides.h, "y");
    }

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 7 days

@github-actions github-actions bot added the stale The label to apply when a pull request or an issue is stale label Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale The label to apply when a pull request or an issue is stale
Projects
None yet
2 participants