Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Grid Cancel Edit Crashes Angular

$
0
0

Alright, the issue ended up being with my read function. It was defined as this:

01.this.getMarkets = function(e) {
02.    marketService.getMarkets($stateParams.nodeId).then(function(data) {
03.        varcontent = angular.element('#dataInputMarkets');
04.        varscope = content.scope();
05.        scope.marketsDataInputController.safeApply(function() {
06.            self.markets = newkendo.data.ObservableArray(data.markets);
07.            e.success(self.markets);
08.        });
09.    }, self.errorHandler);
10.};

 

Notice, on line 6, that I am turning the returned results into a new ObservableArray. If I remove this logic, then the cancel button works as expected. The revised function is thus:

01.this.getMarkets = function(e) {
02.    marketService.getMarkets($stateParams.nodeId).then(function(data) {
03.        varcontent = angular.element('#dataInputMarkets');
04.        varscope = content.scope();
05.        scope.marketsDataInputController.safeApply(function() {
06.            self.markets = data.markets;
07.            e.success(self.markets);
08.        });
09.    }, self.errorHandler);
10.};

Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>