ramyothman / ngx-grid-stack

2 stars 10 forks source link

Setting options bug #1

Open milanstamenkovic opened 5 years ago

milanstamenkovic commented 5 years ago
for (var _a = __values(Object.keys(this.defaultOptions)), _b = _a.next(); !_b.done; _b = _a.next()) {
                var key = _b.value;
                if (!this.options.hasOwnProperty(key)) {
                    this.options = this.defaultOptions[key];
                }
            }

I have found this piece of code in ngx-grid-stack.js. And I think it should be: this.options[key] = this.defaultOptions[key] this way this.options is always equal to the last undefined value from Options object

milanstamenkovic commented 5 years ago

A quick workaround is to set options as follows in your component

options = {
    animate: true,
    cellHeight: '90px',
    float: false,
    height: 0,
    resizable: false,
    width: 12,
  }

This should be minimal configuration for the options object because those are properties from defaultOptions.