Skip to content
Snippets Groups Projects
Commit bcd7b6bb authored by Florent Lavelle's avatar Florent Lavelle
Browse files

fix loader on search

parent a6f1995b
No related branches found
No related tags found
2 merge requests!295Version 3.0.0,!291REDMINE_ISSUE-13010
......@@ -35,6 +35,9 @@ export default {
this.searchFunction(newValue)
.then(() => {
this.$emit('loading', false);
})
.catch((err) => {
if (err.message) this.$emit('loading', false);
});
}, 100)
},
......
......@@ -153,25 +153,21 @@ const projects = {
}
}
try {
const response = await axios.get(
filteredUrl ? filteredUrl : url,
{
cancelToken: cancelToken.token,
}
);
if (response.status === 200) {
const projects = response.data;
if (projects) {
commit('SET_PROJECTS', projects);
commit('SET_PROJECTS_SEARCH_STATE', {
isSearched: true,
text: text
});
}
const response = await axios.get(
filteredUrl ? filteredUrl : url,
{
cancelToken: cancelToken.token,
}
);
if (response.status === 200) {
const projects = response.data;
if (projects) {
commit('SET_PROJECTS', projects);
commit('SET_PROJECTS_SEARCH_STATE', {
isSearched: true,
text: text
});
}
} catch(err) {
console.error(err);
}
},
}
......
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