Commit eaca2033 authored by Phil Hughes's avatar 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
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment