Do not use ng-change on endDate but instead watch both start and end date

This commit is contained in:
Jean-Baptiste Bellet
2022-09-20 15:08:09 +02:00
committed by Konrad
parent a272479483
commit e076e23064
2 changed files with 5 additions and 1 deletions

View File

@@ -25,6 +25,10 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
$scope.resetFilters()
$scope.refreshData()
$scope.$watchCollection "[startDate, endDate]", (newValues, oldValues) ->
if newValues != oldValues
$scope.refreshData()
$scope.refreshData = ->
unless !$scope.orderCycleFilter? || $scope.orderCycleFilter == ''
$scope.setOrderCycleDateRange()