未验证 提交 eaca2033 编写于 作者: P Phil Hughes

Changed diff tree filtering to path

Previously it was using name which could make it hard
to filter for the file you want in a certain folder.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53781
上级 2e690c82
......@@ -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.
先完成此消息的编辑!
想要评论请 注册