Skip to content

Releases: gridstack/gridstack.js

v3.1.0

04 Dec 17:16
f2ef805
Compare
Choose a tag to compare
  • add new addGrid(parent, opts) to create a grid and load children instead of init() + load(), which is used by load() to supports nested grids creation.
    see nested.html demo.
  • save() will now work on nested grids, recursively saving info. added flag to also allow saving the current grid options + children
    (needed for nested grids) so you can now call new adddGrid() to re-create everything from JSON.
  • fix 1505 don't call movable()/resizable() on locked items error. thanks @infime
  • fix 1517 force typescript 3.6 as 3.7+ has breaking change forcing apps to be at least 3.7 (we only used one tiny feature in newest TS, not worth the incompatibility).

v3.0.0

29 Nov 18:07
000f090
Compare
Choose a tag to compare
  • the big news is we finally have a native HTML5 drag&drop plugin (no jquery/query-ui, entire bundle now at 1/3 the size 64k), in addition to legacy jq one (186k), and new static grid bundle (34k). Huge thanks to @rhlin for creating this in stealth mode. Read all about it in main doc.
  • we now have a React example, in addition to Vue - Angular is next!. thanks @eloparco
  • fix placeholder not having custom GridStackOptions.itemClass. thanks @pablosichert
  • fix #1484 dragging between 2 grids and back (regression in 2.0.1)
  • fix #1471 load() into 1 column mode doesn't resize back to 12 correctly
  • fix #1235 update(el, opts) re-write to take all GridStackWidget options (not just x,y,width,height) and do everything efficiently.
    Hiding locked(), move(), resize(), minWidth(), etc... as they just simply call update() which does all the constrain now as well!
  • delete ddPlugin grid option as we only have one drag&drop plugin at runtime, which is defined by the include you use (HTML5 vs jquery vs none)
  • BREAK: change attribute data-gs-min-width is now gs-min-w. We removed 'data-' from all attributes, and shorten 'width|height' to just 'w|h' to require less typing and more efficient (2k saved in .js alone!) #1491 #1492
  • BREAK: also GridStackWidget used in most API width|height|minWidth|minHeight|maxWidth|maxHeight are now shorter w|h|minW|minH|maxW|maxH as well #1493
  • **** see migrating to v3 ****

v2.2.0

07 Nov 14:59
bcd6093
Compare
Choose a tag to compare
  • add margin option now support multi values CSS format '5px 10px 0 20px' or '5em 10em'
  • add data-gs-static-grid attribute
  • fix class="ui-draggable-disabled ui-resizable-disabled" have been added back to static grid items, so existing CSS rule to style continue working #1435
  • fix getting DOM element by id with number works (api that uses GridStackElement handle more string formats)
  • fix setting marginTop (or any 4 sides) caused resize to break. Marking legacy as I recommend using new margin format. Thanks @deadivan for suggested fix.

v2.1.0

29 Oct 06:39
f41fdac
Compare
Choose a tag to compare
  • fix grid static: true to no longer add any drag&drop (even disabled) which should speed things up, and setStatic(T/F) will now correctly add it back/delete for items that need it only.
    Also fixed JQ draggable warning if not initialized first #858
  • add addWidget(opt) now handles just passing a GridStackWidget which creates the default divs, simplifying your code. Old API still supported.
  • add save(saveContent = true) now lets you optionally save the HTML content in the node property, with load() restoring it #1418
  • add GridStackWidget.content now lets you add any HTML content when calling load()/save() or addWidget() #1418
  • add ColumnOptions to column(n, options) for multiple re-layout options, including 'none' that will preserve the x and width, until out of bound/overlap #1338
    including a custom function for you to create the new layout #1332

v2.0.2

06 Oct 06:56
a858509
Compare
Choose a tag to compare
  • fix animate to not re-create CSS style each time (should be faster too) and made it default now since so much nicer. pass {animate: false} grid options if you want instant again #937
  • fix resizable: { handles: ...} forcing alwaysShowResizeHandle behavior #1373

v2.0.1

27 Sep 02:56
391b144
Compare
Choose a tag to compare

lots of bugs fixes (half are regressions) now that people have switched to 2.0

  • fix minWidth(), minHeight(), maxHeight() to set node value as well #1359
  • fix GridStackOptions spelling #1359
  • fix remove window resize event when grid.destroy() #1369
  • fix nested grid resize #1361
  • fix resize with cellHeight '6rem' '6em' not working #1356
  • fix preserve attributes (min/max/id/etc...) when dragging between grids #1367
  • fix 2 drop shadows when dragging between grids #393
    ^^^ always wanted to fix that one. 4 years later.

v2.0.0

08 Sep 01:50
b3d3011
Compare
Choose a tag to compare
  • re-write to native Typescript, removing all JQuery from main code and API (drag&drop plugin still using jqueryui for now)
  • add getGridItems() to return list of HTML grid items
  • add {dragIn | dragInOptions} grid attributes to handle external drag&drop items
  • add save() and load() to serialize grids from JSON, saving all attributes (not just w,h,x,y) #1286
  • add margin to replace verticalMargin which affects both dimensions in code, rather than one in code the other in CSS.
    You can now have perfect square cells (default) #723
  • fix #1299 many columns round-off error
  • fix #1102 loose functionality when they are moved to a new grid
  • add optional params to removeWidget() to have quiet mode (no callbacks)
  • drop support for IE11 due to more compact ES6 output and newer TS code

2.0.0-rc3

04 Sep 19:14
054b3dc
Compare
Choose a tag to compare
2.0.0-rc3 Pre-release
Pre-release
  • fixed package.json main and types field, some doc updates. No code change

v1.2.1

04 Sep 17:53
7813d86
Compare
Choose a tag to compare

fix #1341 Enable the UMD behavior for bundlers compatibility

v2.0.0-rc2

17 Aug 06:05
d4b546e
Compare
Choose a tag to compare
v2.0.0-rc2 Pre-release
Pre-release

good re-write of D&D with generic non jquery code. this fixes the following:

  • #1329 D&D wasn't working correctly in 2.0.0-rc
    went through entire code with fine comb. "had to change 'drop' signature to have 2 elements (original drag and helper) do handle both cases
  • #1102 we no longer make a copy when dragging between grids (just re-parent)
    so all actions and settings stay the same.
    Only time we make a copy is if dragging from an external toolbar and user has helper to clone item
  • #1335 some fixes for new load() API