diff --git a/client/src/utils/filtering.ts b/client/src/utils/filtering.ts index 3556f89b2da3..9f6ceeee6ddc 100644 --- a/client/src/utils/filtering.ts +++ b/client/src/utils/filtering.ts @@ -399,6 +399,7 @@ export default class Filtering { * @returns Filters as 2D array of of [field, value] pairs * */ getFiltersForText(filterText: string, removeAny = true, validate = true): [string, T][] { + filterText = filterText.trim(); const pairSplitRE = this.quoteStrings ? /[^\s'"]+(?:['"][^'"]*['"][^\s'"]*)*|(?:['"][^'"]*['"][^\s'"]*)+/g : /(\S+):(.*?)(?=\s+\S+:|$)/g;