提交 9ce0fa1f 编写于 作者: F 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
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册