Skip to content

Allow regex search in UI - search by regex by default #1403

@hrvoj3e

Description

@hrvoj3e

Describe the feature request

I propose a feature for UI - search by regex by default

This would not break the current behaviour but it would improve search for advanced users.

filtered = filtered.filter(endpoint =>
endpoint.name.toLowerCase().includes(query) ||
(endpoint.group && endpoint.group.toLowerCase().includes(query))

Simple change would be required:

  if (searchQuery.value) {
    const query = searchQuery.value.toLowerCase()
    const regexp = new RegExp(query, 'g');
    filtered = filtered.filter(endpoint => 
      null !== (endpoint.name.toLowerCase().match(regexp) ?? (endpoint.group && endpoint.group.toLowerCase().match(regexp)) ?? null)
    )
  }

Why do you personally want this feature to be implemented?

I want to be able to search more complex names and endpoint across groups when just plain grouping does not provide the needed granularity.

How long have you been using this project?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions