Skip to content
Snippets Groups Projects
Commit efd4f389 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch '902-page-reload-on-search' into 'develop'

Resolve "Search playlist unexpectedly triggers keyboard sortcut commands"

Closes #902

See merge request funkwhale/funkwhale!891
parents 512687ab 19342c60
No related branches found
No related tags found
No related merge requests found
Fixed search usability issue when browsing artists, albums, radios and playlists (#902)
......@@ -110,7 +110,7 @@ export default {
result: null,
page: parseInt(this.defaultPage),
query: this.defaultQuery,
tags: this.defaultTags.filter((t) => { return t.length > 0 }) || [],
tags: (this.defaultTags || []).filter((t) => { return t.length > 0 }),
paginateBy: parseInt(this.defaultPaginateBy || 25),
orderingDirection: defaultOrdering.direction || "+",
ordering: defaultOrdering.field,
......@@ -135,15 +135,18 @@ export default {
},
methods: {
updateQueryString: _.debounce(function() {
this.$router.replace({
query: {
history.pushState(
{},
null,
this.$route.path + '?' + new URLSearchParams(
{
query: this.query,
page: this.page,
tag: this.tags,
paginateBy: this.paginateBy,
ordering: this.getOrderingAsString()
}
})
}).toString()
)
}, 500),
fetchData: _.debounce(function() {
var self = this
......
......@@ -98,7 +98,7 @@ export default {
result: null,
page: parseInt(this.defaultPage),
query: this.defaultQuery,
tags: this.defaultTags.filter((t) => { return t.length > 0 }) || [],
tags: (this.defaultTags || []).filter((t) => { return t.length > 0 }),
paginateBy: parseInt(this.defaultPaginateBy || 30),
orderingDirection: defaultOrdering.direction || "+",
ordering: defaultOrdering.field,
......@@ -123,15 +123,18 @@ export default {
},
methods: {
updateQueryString: _.debounce(function() {
this.$router.replace({
query: {
history.pushState(
{},
null,
this.$route.path + '?' + new URLSearchParams(
{
query: this.query,
page: this.page,
tag: this.tags,
paginateBy: this.paginateBy,
ordering: this.getOrderingAsString()
}
})
}).toString()
)
}, 500),
fetchData: _.debounce(function() {
var self = this
......
......@@ -154,14 +154,17 @@ export default {
},
methods: {
updateQueryString: _.debounce(function() {
this.$router.replace({
query: {
history.pushState(
{},
null,
this.$route.path + '?' + new URLSearchParams(
{
query: this.query,
page: this.page,
paginateBy: this.paginateBy,
ordering: this.getOrderingAsString()
}
})
}).toString()
)
}, 500),
fetchData: _.debounce(function() {
var self = this
......
......@@ -113,14 +113,17 @@ export default {
},
methods: {
updateQueryString: _.debounce(function() {
this.$router.replace({
query: {
history.pushState(
{},
null,
this.$route.path + '?' + new URLSearchParams(
{
query: this.query,
page: this.page,
paginateBy: this.paginateBy,
ordering: this.getOrderingAsString()
}
})
}).toString()
)
}, 250),
fetchData: _.debounce(function() {
var self = this
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment