[Fleet UI] Search bar does not disregard leading and trailing spaces.
Fleet version: v4.44.0 Web browser and operating system:
💥 Actual behavior
When using the search bar in the Fleet UI, I do not see results if there is a space at the beginning of my search term.
If I search for my host in Fleet using 'kath', I see results:
But ' kath' and 'kath ' do not return results
This also applies when searching by CVE in Software, as well as searching Queries or Policies by name.
🧑💻 Steps to reproduce
In Dogfood:
- Search hosts using 'kath', ' kath', and 'kath '
- Search Policies for the Workstations team using 'lin', ' lin' and 'lin '
- Search Queries for the Workstations team using 'col', ' col', and 'col '
- Search Software for the Workstations team using '523', ' 523' and '523 '
🕯️ More info (optional)
N/A
Discussion with the team:We will remove leading and ending spaces assuming no host or CVE has them. We will also trim spaces for policies and queries.
To be clear on the scope: Only trim on the search (no trim on creating anything)
@rachaelshaw if good, NP. else take to product.
Adding 3 points at sprint kickoff to account for wide-reaching integration test coverage requirement
@jacobshandling Please note that as per the new process we need to merge into the patch branch patch-fleet-v4.47.1
Spaces at the start and end, Like dewdrops, gently swept away. Fleet's search, now more friend.