Closed elado closed 10 years ago
I'm having this issue too.
Any pointers as to how to fix this? I might have the time to send a PR.
@climatewarrior an easy way to fix it would be this.
if ((oldModel? oldModel.length : 0) !== newModel.length) { self.$$createColumns(); }
OR
if ((oldModel || []).length !== newModel.length) { self.$$createColumns(); }
I don't know if there is something more angular way to do it. I am assuming that when the model changes, it will change to a valid array
@nicoabie Thanks!! Now it works :) Although I'm still getting the following error: Error: newModel is undefined
but the functionality is not affected.
@climatewarrior you are welcome, can you provide an example in jsfiddle or similar to analyze it further?
Okay, implemented a fallback mechanism here. Can anybody doublecheck if the problem still persists?
@akoenig It's working just fine for me, thanks!!
Okay, cool. Thanks for the check :) Release v0.4.1 is live.
My data source comes from a service, on a callback. Until the callback it's not available.
If I have it as an empty array,
$scope.data = []
before the service, it does work. My guess is that the code should also check if there's something in the model before accessing its.length
.