Trim whitespace from selectedIds, not searchString