Skip to content

Commit 2048348

Browse files
authored
Merge pull request #2021 from bhowell2-fleetio/fix-float-save-options
update Grid's options when setting float
2 parents 75227e4 + 4961acd commit 2048348

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ coverage
66
dist
77
node_modules
88
.vscode
9+
.idea/

src/gridstack.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,8 +790,10 @@ export class GridStack {
790790
* enable/disable floating widgets (default: `false`) See [example](http://gridstackjs.com/demo/float.html)
791791
*/
792792
public float(val: boolean): GridStack {
793-
this.engine.float = val;
794-
this._triggerChangeEvent();
793+
if (this.opts.float !== val) {
794+
this.opts.float = this.engine.float = val;
795+
this._triggerChangeEvent();
796+
}
795797
return this;
796798
}
797799

0 commit comments

Comments
 (0)