@@ -332,26 +332,9 @@ cyclotronApp.controller 'TableWidget', ($scope, $location, $window, dashboardSer
332332
333333 data = eventData .data [dsDefinition .resultSet ].data
334334 isUpdate = eventData .isUpdate
335-
336- # Filter the data if the widget has "filters"
337- if $scope .widget .filters ?
338- data = dataService .filter (data, $scope .widget .filters )
339-
340- # Check for no data
341- if _ .isEmpty data
342- $scope .sortedRows = null
343- $scope .widgetContext .loading = false
344- $scope .widgetContext .allowExport = false
345-
346- if $scope .widget .noData ?
347- $scope .widgetContext .nodata = _ .jsExec ($scope .widget .noData )
348-
349- else
350- $scope .widgetContext .nodata = null
351- return
352- else
353- $scope .widgetContext .nodata = null
354- $scope .widgetContext .allowExport = $scope .widget .allowExport != false
335+
336+ # Filter and sort the data
337+ data = $scope .filterAndSortWidgetData (data)
355338
356339 data = _ .cloneDeep (data)
357340 _ .each data, (row , index ) -> row .__index = index
@@ -421,7 +404,7 @@ cyclotronApp.controller 'TableWidget', ($scope, $location, $window, dashboardSer
421404 $scope .processRules (data, $scope .widget .rules )
422405
423406 # Save and sort rows
424- $scope .sortedRows = $scope . widgetContext . data = data
407+ $scope .sortedRows = data
425408 $scope .sortRows ()
426409
427410 $scope .paging .totalItems = $scope .sortedRows .length
0 commit comments