{"action":"created","issue":{"url":"https://api.github.com/repos/patrickkunka/mixitup/issues/329","repository_url":"https://api.github.com/repos/patrickkunka/mixitup","labels_url":"https://api.github.com/repos/patrickkunka/mixitup/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/patrickkunka/mixitup/issues/329/comments","events_url":"https://api.github.com/repos/patrickkunka/mixitup/issues/329/events","html_url":"https://github.com/patrickkunka/mixitup/issues/329","id":236111732,"number":329,"title":"MixItUp Pagination: Add onPaginateStart/onPaginateEnd callbacks","user":{"login":"patrickkunka","id":1686556,"avatar_url":"https://avatars3.githubusercontent.com/u/1686556?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickkunka","html_url":"https://github.com/patrickkunka","followers_url":"https://api.github.com/users/patrickkunka/followers","following_url":"https://api.github.com/users/patrickkunka/following{/other_user}","gists_url":"https://api.github.com/users/patrickkunka/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickkunka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickkunka/subscriptions","organizations_url":"https://api.github.com/users/patrickkunka/orgs","repos_url":"https://api.github.com/users/patrickkunka/repos","events_url":"https://api.github.com/users/patrickkunka/events{/privacy}","received_events_url":"https://api.github.com/users/patrickkunka/received_events","type":"User","site_admin":false},"labels":[{"id":37942293,"url":"https://api.github.com/repos/patrickkunka/mixitup/labels/Enhancement","name":"Enhancement","color":"84b6eb","default":false},{"id":627188399,"url":"https://api.github.com/repos/patrickkunka/mixitup/labels/MixItUp%20Pagination","name":"MixItUp Pagination","color":"bfd4f2","default":false}],"state":"closed","locked":false,"assignee":{"login":"patrickkunka","id":1686556,"avatar_url":"https://avatars3.githubusercontent.com/u/1686556?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickkunka","html_url":"https://github.com/patrickkunka","followers_url":"https://api.github.com/users/patrickkunka/followers","following_url":"https://api.github.com/users/patrickkunka/following{/other_user}","gists_url":"https://api.github.com/users/patrickkunka/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickkunka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickkunka/subscriptions","organizations_url":"https://api.github.com/users/patrickkunka/orgs","repos_url":"https://api.github.com/users/patrickkunka/repos","events_url":"https://api.github.com/users/patrickkunka/events{/privacy}","received_events_url":"https://api.github.com/users/patrickkunka/received_events","type":"User","site_admin":false},"assignees":[{"login":"patrickkunka","id":1686556,"avatar_url":"https://avatars3.githubusercontent.com/u/1686556?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickkunka","html_url":"https://github.com/patrickkunka","followers_url":"https://api.github.com/users/patrickkunka/followers","following_url":"https://api.github.com/users/patrickkunka/following{/other_user}","gists_url":"https://api.github.com/users/patrickkunka/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickkunka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickkunka/subscriptions","organizations_url":"https://api.github.com/users/patrickkunka/orgs","repos_url":"https://api.github.com/users/patrickkunka/repos","events_url":"https://api.github.com/users/patrickkunka/events{/privacy}","received_events_url":"https://api.github.com/users/patrickkunka/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2017-06-15T08:18:50Z","updated_at":"2017-11-11T19:55:15Z","closed_at":"2017-11-11T19:55:15Z","author_association":"OWNER","body":"Currently, users are limited to using the catch all `onMixStart`/`onMixEnd` callbacks, and using state checking logic to determine if a pagination operation occurred.\r\n\r\nFor example:\r\n\r\n```js\r\nvar activePage = 1;\r\nvar activeLimit = 8;\r\n\r\nvar mixer = mixitup(containerEl, {\r\n    load: {\r\n        page: activePage\r\n    }\r\n    pagination: {\r\n        limit: activeLimmit\r\n    },\r\n    callbacks: {\r\n        onMixEnd: function(state) {\r\n            if (state.activePagination.limit === activeLimit && state.activePagination.page === activePage) return;\r\n\r\n            // Pagination state has changed:\r\n\r\n            activePage = state.activePagination.page;\r\n            activeLimit = state.activePagination.limit;\r\n\r\n            paginationCallback();\r\n        }\r\n    }\r\n});\r\n\r\nfunction paginationCallback() {\r\n    // do something only when pagination state has changed\r\n}\r\n```\r\n\r\nAdding two new paginate specific callbacks would make things a lot easier for people wanting to trigger some custom functionality (typically scroll to top of container) on page change etc."},"comment":{"url":"https://api.github.com/repos/patrickkunka/mixitup/issues/comments/343690004","html_url":"https://github.com/patrickkunka/mixitup/issues/329#issuecomment-343690004","issue_url":"https://api.github.com/repos/patrickkunka/mixitup/issues/329","id":343690004,"user":{"login":"patrickkunka","id":1686556,"avatar_url":"https://avatars3.githubusercontent.com/u/1686556?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickkunka","html_url":"https://github.com/patrickkunka","followers_url":"https://api.github.com/users/patrickkunka/followers","following_url":"https://api.github.com/users/patrickkunka/following{/other_user}","gists_url":"https://api.github.com/users/patrickkunka/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickkunka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickkunka/subscriptions","organizations_url":"https://api.github.com/users/patrickkunka/orgs","repos_url":"https://api.github.com/users/patrickkunka/repos","events_url":"https://api.github.com/users/patrickkunka/events{/privacy}","received_events_url":"https://api.github.com/users/patrickkunka/received_events","type":"User","site_admin":false},"created_at":"2017-11-11T19:55:15Z","updated_at":"2017-11-11T19:55:15Z","author_association":"OWNER","body":"These callbacks are now added in the latest version of Pagination v3.3.0."}}
{"actor":{"display_login":"patrickkunka"}}