Skip to content
Snippets Groups Projects
Commit 95145909 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

fix filtered features route not taking feature type filter

parent ae7db258
No related branches found
No related tags found
1 merge request!531REDMINE_ISSUE-15794| Modification des attributs en masse - Copie de tous les attributs si le champ est laissé vide
......@@ -47,7 +47,7 @@ export default {
query() {
if (this.project) {
const searchParams = { ordering: this.project.feature_browsing_default_sort };
if (this.project.feature_browsing_default_filter === 'feature_type') { // when feature_type is the default filter of the project,
if (this.project.feature_browsing_default_filter === 'feature_type_slug') { // when feature_type is the default filter of the project,
searchParams['feature_type_slug'] = this.properties.feature_type.slug; // get its slug for the current feature
}
if (this.position >= 0) {
......
......@@ -128,7 +128,7 @@ const mapService = {
const goToBrowseFeatureDetail = async () => {
const currentQuery = { ...this.queryParams };
if (this.queryParams && this.queryParams.feature_type_slug === 'feature_type') { // when feature_type is the default filter of the project,
if (this.queryParams && this.queryParams.filter === 'feature_type_slug') { // when feature_type is the default filter of the project,
currentQuery['feature_type_slug'] = featureTypeSlug; // get its slug for the current feature
}
const searchParams = new URLSearchParams(currentQuery); // urlSearchParams allow to get rid of undefined values
......
......@@ -437,7 +437,7 @@ export default {
addToMap: true,
queryParams: {
ordering: this.project.feature_browsing_default_sort,
feature_type_slug: this.project.feature_browsing_default_filter,
filter: this.project.feature_browsing_default_filter,
}
});
})
......
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