Commit d5ab9895 authored by Simon Knox's avatar Simon Knox Committed by Oswaldo Ferreira

fix lint

parent d84a42bd
......@@ -88,7 +88,7 @@ $(() => {
Store.filter.path.split('&').filter(param => param.match(new RegExp(`^${key}=(.*)$`, 'g')) === null)
).join('&');
this.cantEdit.push({
tokenName,
name: tokenName,
value,
});
};
......@@ -108,7 +108,7 @@ $(() => {
}
this.cantEdit.push({
tokenName: 'label',
name: 'label',
value: label.title,
});
});
......
......@@ -44,8 +44,9 @@ export default class FilteredSearchBoards extends gl.FilteredSearchManager {
}
canEdit(tokenName, tokenValue) {
if (tokenValue && this.hiddenTokenNames.includes(tokenName)) {
return this.cantEdit.findIndex(i => i.tokenName === tokenName && i.value === tokenValue) === -1;
// only hide tokens if both name and value match. This allows mix of hidden and visible Label tokens
if (tokenValue) {
return this.cantEdit.findIndex(t => t.name === tokenName && t.value === tokenValue) === -1;
}
return this.hiddenTokenNames.indexOf(tokenName) === -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