Fixed some debouncing issues

This commit is contained in:
Eliot Berriot 2017-12-17 20:24:48 +01:00
parent e1817cc5c2
commit 0c5f151fc1
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
3 changed files with 5 additions and 4 deletions

View File

@ -103,7 +103,7 @@ export default {
$('.ui.dropdown').dropdown() $('.ui.dropdown').dropdown()
}, },
methods: { methods: {
updateQueryString: function () { updateQueryString: _.debounce(function () {
this.$router.replace({ this.$router.replace({
query: { query: {
query: this.query, query: this.query,
@ -112,7 +112,7 @@ export default {
ordering: this.getOrderingAsString() ordering: this.getOrderingAsString()
} }
}) })
}, }, 500),
fetchData: _.debounce(function () { fetchData: _.debounce(function () {
var self = this var self = this
this.isLoading = true this.isLoading = true

View File

@ -27,7 +27,7 @@ export default {
let wrapper = function (event) { let wrapper = function (event) {
// we check here the event is not triggered from an input // we check here the event is not triggered from an input
// to avoid collisions // to avoid collisions
if (!$(event.target).is(':input, [contenteditable]')) { if (!$(event.target).is('.field, :input, [contenteditable]')) {
handler(event) handler(event)
} }
} }

View File

@ -50,7 +50,8 @@ export default new Router({
component: Favorites, component: Favorites,
props: (route) => ({ props: (route) => ({
defaultOrdering: route.query.ordering, defaultOrdering: route.query.ordering,
defaultPage: route.query.page defaultPage: route.query.page,
defaultPaginateBy: route.query.paginateBy
}) })
}, },
{ {