Commit ded17994 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch 'tz-replace-commit-search-fadeTo' into 'master'

Replaced last fadeTo in Commit history

See merge request gitlab-org/gitlab!49020
parents 157d1a60 fcf85fd0
......@@ -31,7 +31,7 @@ export default class CommitsList {
const search = this.searchField.val();
if (search === this.lastSearch) return Promise.resolve();
const commitsUrl = `${form.attr('action')}?${form.serialize()}`;
this.content.fadeTo('fast', 0.5);
this.content.addClass('gl-opacity-5');
const params = form.serializeArray().reduce(
(acc, obj) =>
Object.assign(acc, {
......@@ -47,7 +47,7 @@ export default class CommitsList {
.then(({ data }) => {
this.lastSearch = search;
this.content.html(data.html);
this.content.fadeTo('fast', 1.0);
this.content.removeClass('gl-opacity-5');
// Change url so if user reload a page - search results are saved
window.history.replaceState(
......@@ -59,7 +59,7 @@ export default class CommitsList {
);
})
.catch(() => {
this.content.fadeTo('fast', 1.0);
this.content.removeClass('gl-opacity-5');
this.lastSearch = null;
});
}
......
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