Code Monkey home page Code Monkey logo

Comments (12)

STRML avatar STRML commented on May 18, 2024 13

maxRows is implemented, but somewhat buggy. It is possible to push an item beyond the maxRows as the compaction algorithm is not tuned to move elements sideways.

from react-grid-layout.

STRML avatar STRML commented on May 18, 2024 6

Please don't spam us with +1 comments. Use the emoji, or, better yet, submit a PR.

from react-grid-layout.

jlndk avatar jlndk commented on May 18, 2024 3

+1

from react-grid-layout.

 avatar commented on May 18, 2024 2

+1. @STRML I'd be more than happy to implement it myself if you could point out what would need adjusting... I took a look at mixinResizable in lib/GridItem.jsx, but it seems we'd have to restrict more than just the height component of maxConstraints. (Imagine a layout with verticalCompact set to false and the smallest possible GridItem being dragged around.)

from react-grid-layout.

antoine35 avatar antoine35 commented on May 18, 2024 2

Has anyone found a solution to force the maximum number of lines ? Thanks

from react-grid-layout.

ryancwalsh avatar ryancwalsh commented on May 18, 2024 1

Thank you so much for this amazing library. I'm very impressed.

I would definitely love if we had maxRows and maxCols props that worked well. (E.g. I'd like to have a 3x3 grid of tiles that can be dragged around only within that 3x3 grid.)

From the comments on this issue and the linked one, it seems like the callbacks that would be necessary in order to implement maxRows and maxCols props don't exist either.

As I start to use react-grid-layout, I will explore, and I'll let you know if I come up with anything.

from react-grid-layout.

STRML avatar STRML commented on May 18, 2024

Sorry, this is not yet possible. You could likely implement it yourself using the onDragStop and onResizeStop handlers.

from react-grid-layout.

ngotchac avatar ngotchac commented on May 18, 2024

That would be great! :)

from react-grid-layout.

SomethingSexy avatar SomethingSexy commented on May 18, 2024

If props.onDrag or props.onDragStop returned whether it could be dropped help with this situation? I am looking for something similar but trying to figure out I can implement it with the given props now.

from react-grid-layout.

github-actions avatar github-actions commented on May 18, 2024

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

from react-grid-layout.

adnan-smlatic avatar adnan-smlatic commented on May 18, 2024

Any news on this in 2024? I'm facing the same issue, trying to make a 2x3 grid of tiles that can only be moved within the grid, but it ended up being such a headache.

@ryancwalsh did you figure it out?

from react-grid-layout.

ryancwalsh avatar ryancwalsh commented on May 18, 2024

@adnan-smlatic Nope.

from react-grid-layout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.