Commit 6f7be97e authored by Nick Thomas's avatar Nick Thomas

Fix "Fix conflicts in filtered search"

parent 6080ff90
......@@ -108,6 +108,9 @@ class FilteredSearchDropdown {
if (hook) {
const data = hook.list.data || [];
if (!data) return;
const results = data.map((o) => {
const updated = o;
updated.droplab_hidden = false;
......
......@@ -137,6 +137,8 @@ class FilteredSearchManager {
const { lastVisualToken } = gl.FilteredSearchVisualTokens.getLastVisualTokenBeforeInput();
if (this.filteredSearchInput.value === '' && lastVisualToken) {
if (this.canEdit && !this.canEdit(lastVisualToken)) return;
this.filteredSearchInput.value = gl.FilteredSearchVisualTokens.getLastTokenPartial();
gl.FilteredSearchVisualTokens.removeLastTokenPartial();
}
......@@ -222,6 +224,8 @@ class FilteredSearchManager {
editToken(e) {
const token = e.target.closest('.js-visual-token');
if (this.canEdit && !this.canEdit(token)) return;
if (token) {
gl.FilteredSearchVisualTokens.editToken(token);
this.tokenChange();
......
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