ui: convert all spaces to commas for filter
We replace all spaces by commas when filtering the status page, however, due to the fact we don't use the `g` flag, it only splits the first value and stops after the first one. This patch adds the `g` flag to the regex so that all of the spaces are replaced by commas when filtering. Change-Id: I9b9cd33a7067fd00415e2ae1634e340a6df46749
This commit is contained in:
parent
ceb12831b1
commit
b226cffc5a
@ -114,7 +114,7 @@ class JobsList extends React.Component {
|
||||
let filtered = false
|
||||
if (filter) {
|
||||
filtered = true
|
||||
let filters = filter.replace(/ +/, ',').split(',')
|
||||
let filters = filter.replace(/ +/g, ',').split(',')
|
||||
for (let job of jobs) {
|
||||
filters.forEach(jobFilter => {
|
||||
if (jobFilter && (
|
||||
|
@ -90,7 +90,7 @@ class Pipeline extends React.Component {
|
||||
|
||||
filterQueue(queue, filter) {
|
||||
let found = false
|
||||
let filters = filter.replace(/ +/, ',').split(',')
|
||||
let filters = filter.replace(/ +/g, ',').split(',')
|
||||
queue.heads.forEach(changes => {
|
||||
changes.forEach(change => {
|
||||
filters.forEach(changeFilter => {
|
||||
|
Loading…
Reference in New Issue
Block a user