angular-gridster2
angular-gridster2 copied to clipboard
GridsterItem resizableHandles property overrides the whole grid instead of each item
Feature #821 introduced the resizableHandles
property, which should allow the resize handles to be specified individually for each Gridster item, overriding any resize handle settings in the grid options for that specific item.
Unfortunately, it seems as though the grid is only looking at the resizableHandles
property on the first item in the grid, and applying that item's resize handle settings to all items in the grid.
I've made a StackBlitz to demonstrate the issue.
The grid in the StackBlitz example only has two items:
-
resizableHandles
set to onlys
so it should have a resize handle on the bottom -
resizableHandles
set to onlye
so it should have a resize handle on the right side
Instead of each item using its own resizableHandles
settings, both items have resize handles on the bottom only.
If I've set this up incorrectly, please just let me know what I'm doing wrong.
Thanks to everyone involved in the project, you're doing great work!
Running into the same issue, can confirm the grid item specific resizableHandles
on the first grid item is applied to all other grid items.
I had a bit of time to look into this today and I've created a pull request that fixes the issue.
I didn't realise at the time, but you can replicate this issue on the "items" page of the documentation. Looking at the code of that page, it's clear that the intention of the checkboxes is to override properties on the first item in the grid, but instead they override every item.
Using the spread operator {...}
instead of the GridsterUtils.merge
function fixes the bug.