SitePen / dgrid

A lightweight, mobile-ready, data-driven, modular grid widget designed for use with dstore
http://dgrid.io/
Other
628 stars 298 forks source link

Option to automatically find and destroy embedded dijits. #163

Closed mikerobi closed 12 years ago

mikerobi commented 12 years ago

Wiring the grid to destroy dijits when a row is removed, updated, or the grid is destroyed, is a bit awkard. It is a lot more work compared to being able to call destroyRecursive on the old DataGrids. Unfortunately there are a lot of developers who don't even understand the importance to doing this.

I think that if there is a clearly documented option for this, it would eliminate a lot of accidental memory leaks.

ghost commented 12 years ago

I've added https://github.com/SitePen/dgrid/wiki/Working-with-Widgets with a section about this; let me know if you think it could use any clarification.

I did briefly consider adding this capability i.e. to the DijitRegistry extension itself, but given that column plugins (e.g. editor) are capable of handling this for themselves atomically, and given that they would ostensibly aspect onto removeRow after any generic handler in a mixin/extension, I didn't want to invite confusion as to order of operations.

ghost commented 12 years ago

Since this hasn't elicited further response after the doc update, I'm closing this issue, but feel free to comment or open a new issue if you think there's still something to be done. Thanks!