Comments (12)
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.
Please don't spam us with +1
comments. Use the emoji, or, better yet, submit a PR.
from react-grid-layout.
+1
from react-grid-layout.
+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.
Has anyone found a solution to force the maximum number of lines ? Thanks
from react-grid-layout.
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.
Sorry, this is not yet possible. You could likely implement it yourself using the onDragStop
and onResizeStop
handlers.
from react-grid-layout.
That would be great! :)
from react-grid-layout.
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.
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.
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.
@adnan-smlatic Nope.
from react-grid-layout.
Related Issues (20)
- Looking for placeholder appears ratio setting
- Currently supporting VerticalCompact, does it not support HorizontalCompact
- Using with Nextjs 14 HOT 3
- [rtl resize] In RTL resize, when I try to shrink it, it gets bigger instead
- Race condition on React 18 setState causes mouse to "skip" when dragging / resizing. HOT 7
- Positioning and Resizing does not work as intended in production mode HOT 2
- The performance of the grid layout is adversely affected when dealing with large SVG grid elements (size ≥ 1MB). HOT 4
- dragging working not correct HOT 10
- Setting item height based on rowHeight in OnResize is buggy HOT 1
- The x,y coordinate of the item is incorrect
- When columns are thin and column spacing is set, items move from their grid position when clicked HOT 3
- Issue with Red Color Popover on Item Click in Versions 1.4.3 and Above HOT 7
- [feature request] Drop onto another widget
- Dynamic static changes on children do not change children rendering HOT 2
- Grid item shifts leftward unexpectedly when dragging leftward resize handle.
- Responsive Grid Layout not working.. HOT 2
- React-grid-layout, antd dynamic form list HOT 1
- Upgrading dependencies causes react-grid-layout Responsive to crash with babel-loader error HOT 3
- Have errors in utils.js && ReactGridLayout.js HOT 3
- This repo should have updates for React 18+ HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-grid-layout.