Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete filter #787

Merged
merged 1 commit into from
Nov 28, 2023
Merged

Autocomplete filter #787

merged 1 commit into from
Nov 28, 2023

Conversation

rszwajko
Copy link
Contributor

@rszwajko rszwajko commented Nov 23, 2023

Typeahead filter inspired by Console's AutocompleteInput.

Key features:

  1. match the search pattern in the entire string (not only prefix)
  2. reset the filter after selection - the selected item is visible in
    the chip list

Contract:

  1. enum values passed as supportedValues param have id prop the same as
    the label prop
  2. values in supportedValues are unique (no de-duplication similar
    to EnumFilter)

Reference-Url: http://v4-archive.patternfly.org/v4/components/select#typeahead
Reference-Url: https://github.com/openshift/console/blob/cf961054415464ba90959b614517903fc9b808a3/frontend/public/components/autocomplete.tsx#L22

Screencast.from.2023-11-27.13-17-46.webm

@rszwajko rszwajko force-pushed the autocompleteFilter branch 2 times, most recently from 8669efd to 8ede558 Compare November 27, 2023 13:29
@rszwajko rszwajko requested review from yaacov, sgratch and sjd78 November 27, 2023 13:29
Typeahead filter inspired by Console's AutocompleteInput.

Key features:
1. match the search pattern in the entire string (not only prefix)
2. reset the filter after selection - the selected item is visible in
   the chip list

Contract:
1. enum values passed as supportedValues param have id prop the same as
   the label prop
2. values in supportedValues are unique (no de-duplication similar
   to EnumFilter)

Reference-Url: http://v4-archive.patternfly.org/v4/components/select#typeahead
Reference-Url: https://github.com/openshift/console/blob/cf961054415464ba90959b614517903fc9b808a3/frontend/public/components/autocomplete.tsx#L22
Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rszwajko rszwajko marked this pull request as ready for review November 28, 2023 15:36
@yaacov yaacov merged commit 34539a8 into kubev2v:main Nov 28, 2023
8 checks passed
@yaacov
Copy link
Member

yaacov commented Nov 28, 2023

Fixes: #790

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants