Skip to content

Commit 8945004

Browse files
committed
SUPPORT-130 [TABLE] No sorting showing in the list when click on header
work around an angular bug: angular/angular.js#15422 when adding watches in a watch, then angular skips watches that only executes the next time. (and the next and the next if the skipped watches would add watches again)
1 parent c052b79 commit 8945004

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

servoy_ngclient/war/servoyservices/foundset_linked_property/foundsetLinked.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,14 @@ angular.module('foundset_linked_property', ['webSocketModule', 'servoyApp', 'fou
143143
initialVPSize = -1;
144144
if (!angular.isDefined(newV)) newV = 0;
145145

146-
$viewportModule.removeDataWatchesFromRows(newValue.length, internalState);
147-
generateWholeViewportFromOneValue(newV);
148-
updateWholeViewport();
149-
$viewportModule.addDataWatchesToRows(newValue, internalState, componentScope, true, internalState[PUSH_TO_SERVER]);
146+
if (componentScope) {
147+
componentScope.$evalAsync(function(){
148+
$viewportModule.removeDataWatchesFromRows(newValue.length, internalState);
149+
generateWholeViewportFromOneValue(newV);
150+
updateWholeViewport();
151+
$viewportModule.addDataWatchesToRows(newValue, internalState, componentScope, true, internalState[PUSH_TO_SERVER]);
152+
})
153+
}
150154
});
151155
} else if (angular.isDefined(serverJSONValue[VIEWPORT_VALUE])) {
152156
internalState.recordLinked = true;

0 commit comments

Comments
 (0)