Commit 9ce0fa1f authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'mr-tree-filter-path-name' into 'master'

Changed diff tree filtering to path

Closes #53781

See merge request gitlab-org/gitlab-ce!22978
parents f93539af eaca2033
......@@ -35,7 +35,7 @@ export default {
if (search === '') return this.renderTreeList ? this.tree : this.allBlobs;
return this.allBlobs.filter(f => f.name.toLowerCase().indexOf(search) >= 0);
return this.allBlobs.filter(f => f.path.toLowerCase().indexOf(search) >= 0);
},
rowDisplayTextKey() {
if (this.renderTreeList && this.search.trim() === '') {
......
---
title: Changed merge request filtering to be by path instead of name
merge_request:
author:
type: changed
......@@ -81,7 +81,7 @@ describe('Diffs tree list component', () => {
});
it('filters tree list to blobs matching search', done => {
vm.search = 'index';
vm.search = 'app/index';
vm.$nextTick(() => {
expect(vm.$el.querySelectorAll('.file-row').length).toBe(1);
......
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