BTMorton / angular2-grid

A drag/drop/resize grid-based plugin directive for angular2
https://bmorton.co.uk/angular/
MIT License
354 stars 159 forks source link

Errors if config is blank #275

Closed szechyjs closed 6 years ago

szechyjs commented 6 years ago

If I don't input a complete NgGridConfig or NgGridItemConfig I get the following type of errors.

TypeError: Cannot create property 'col' on string ''

https://github.com/BTMorton/angular2-grid/blob/master/src/directives/NgGridItem.ts#L72

In my opinion, if a null or empty object is passed to the ngGrid or ngGridItem attribute, the directive should just use all of the defaults.