BigW Consortium Gitlab

Commit 6d2d2b2b by Clement Ho

Add filtering to the remaining dropdowns

parent d91d586a
......@@ -24,6 +24,14 @@
super.renderContent();
droplab.setData(this.hookId, 'labels.json');
}
filterMethod(item, query) {
const { value } = gl.FilteredSearchTokenizer.getLastTokenObject(query);
const valueWithoutPrefix = value.slice(1);
item.droplab_hidden = item['title'].indexOf(valueWithoutPrefix) === -1;
return item;
}
}
global.DropdownLabel = DropdownLabel;
......
......@@ -24,6 +24,14 @@
super.renderContent();
droplab.setData(this.hookId, 'milestones.json');
}
filterMethod(item, query) {
const { value } = gl.FilteredSearchTokenizer.getLastTokenObject(query);
const valueWithoutPrefix = value.slice(1);
item.droplab_hidden = item['title'].indexOf(valueWithoutPrefix) === -1;
return item;
}
}
global.DropdownMilestone = DropdownMilestone;
......
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