EvHaus / doby-grid

An HTML table element on steroids.
Other
14 stars 5 forks source link

Include user-specified row heights in saved state #171

Closed mminer closed 9 years ago

mminer commented 9 years ago

This change includes a row's height in the output of getState, which restoreState will then respect. This allows users to freely resize rows and their changes will remain intact when the grid refreshes (provided that the developer makes use of getState and restoreState). Only rows that were manually resized by the user are included.

This was requested in #83.

(also, my editor stripped some trailing whitespace and I missed it before committing; I hope you don't mind)

EvHaus commented 9 years ago
  1. Can you confirm that map(), reduce() and filter() are compatible with DobyGrid's browser support limits? Listed here: http://dobyjs.com/#grid If not, can you switch over to underscore.js polyfills instead?
  2. Can you create a quick unit test for this feature? Render grid, resize a row, save state, reset grid, load state, confirm that row is resized correctly. This will also help identify issues with item 1 above since Jasmine tests are run via Phantom JS which may not have support for those methods above.
mminer commented 9 years ago
  1. Browser support for map, reduce, and filter looks good — they require Firefox 3+, Safari 4+, IE9+, or any version of Chrome (see compatibility table on MDN).
  2. Test committed.