angular-deckgrid
angular-deckgrid copied to clipboard
Custom Watcher
My company is using angular-deckgrid and we ran into issues with the watcher being too complex because we have circular references in our objects. This PR allows you to supply a function which is used to create a string that will be used as the watch expression.
I'm running into a similar need +1 this PR
I'm having a similar issue with circular dependency. The deck can still render, but only after a long and painful list of RangeError: Maximum call stack size exceeded
errors. I found out it might be because of this line 197 in the code:
watcher = this.$$scope.$watch('model', this.$$onModelChange.bind(this), true);
The deep watch over here is makes circular dependency not work. While in my company usecase, I changed it to $watchCollection
and remove true
it works fine, I'm wondering what may be other cases in which true
param at the end might be useful.
I could create a PR to make this change but I'm unsure if this's the intended usecase.
Thanks