Skip to content

Commit ecfa2d2

Browse files
committed
account for current page and page size when hiding schedules (fix #183)
has not been tested fix build
1 parent e9fe9c2 commit ecfa2d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

assets/src/modules/sm/Schedule/directives/scheduleActionsDirective.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ angular.module('sm').directive('scheduleActions', function ($http, $q, shareServ
142142

143143
hide: function () {
144144
ga('send', 'event', 'schedule', 'hide')
145-
scope.$parent.$parent.state.schedules.splice(scope.$index, 1)
145+
const appstate = scope.$parent.$parent.state;
146+
const pageStartIndex = appstate.displayOptions.currentPage * appstate.displayOptions.pageSize;
147+
148+
appstate.schedules.splice(pageStartIndex + scope.$index, 1)
146149
}
147150
}
148151
};

0 commit comments

Comments
 (0)