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

Gridster not allowing to add item when defaultItemCols and defaultItemRows is more then 1. #912

Open
jtestsmit opened this issue Apr 29, 2024 · 1 comment

Comments

@jtestsmit
Copy link

Hello,

I implemented drag-and-drop with Gridster's latest updates and Declared defaultItemCols is set to 6 and defaultItemRows 3 which makes 6x3 Gridster item. But with this configuration Gridster not allowing to add the item from cell 7.

current widget options is set as below:
this.options = {
enableEmptyCellDrop: true,
draggable: {
enabled: true,
stop: this.dragStop.bind(this),
delayStart: 300,
},
swap: this.widgetSwap,
disablePushOnDrag: this.widgetPush,
pushItems: true,
resizable: {
enabled: this.enableResizable,
},
minCols: 12,
minRows: 25,
maxCols: 12,
emptyCellDropCallback: this.onDrop.bind(this),
displayGrid: "onDrag&Resize",
pushDirections: { north: true, east: true, south: true, west: true },
itemResizeCallback: this.itemResize.bind(this),
itemChangeCallback: this.itemChange.bind(this),
gridType: "scrollVertical",
margin: 10,
scrollToNewItems: "true",
defaultItemCols: 3,
defaultItemRows: 2,
minItemCols: 1,
minItemRows: 1,
addEmptyRowsCount: 10,
compactType: this.compactType,
// enableBoundaryControl: true
};

@jtestsmit
Copy link
Author

Attached issue gif .
Issue_gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant