Commit 54984485 authored by Regis's avatar Regis

use Turbolinks instead of window.pushState for pagination

parent 76c68d1a
......@@ -17,15 +17,12 @@
/**
This function will take the information given by the pagination component
And make a new API call from the parent
And make a new Turbolinks call
Here is an example `change` method:
change(pagenum, apiScope) {
window.history.pushState({}, null, `?scope=${apiScope}&p=${pagenum}`);
clearInterval(this.timeLoopInterval);
this.pageRequest = true;
this.store.fetchDataLoop.call(this, Vue, pagenum, this.scope, apiScope);
Turbolinks.visit(`?scope=${apiScope}&p=${pagenum}`);
},
*/
......
/* global Vue, gl */
/* global Vue, Turbolinks, gl */
/* eslint-disable no-param-reassign */
((gl) => {
......@@ -36,10 +36,7 @@
},
methods: {
change(pagenum, apiScope) {
window.history.pushState({}, null, `?scope=${apiScope}&p=${pagenum}`);
clearInterval(this.timeLoopInterval);
this.pageRequest = true;
this.store.fetchDataLoop.call(this, Vue, pagenum, this.scope, apiScope);
Turbolinks.visit(`?scope=${apiScope}&p=${pagenum}`);
},
author(pipeline) {
if (!pipeline.commit) return { avatar_url: '', web_url: '', username: '' };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment