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

fix: Do not show selected tags in picker suggestions when no input is provided #1985 #2195

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

marek-mihok
Copy link
Contributor

The PR fulfills these requirements: (check all the apply)

  • It's submitted to the main branch.
  • When resolving a specific issue, it's referenced in the PR's title (e.g. feat: Add a button #xxx, where "xxx" is the issue number).
  • When resolving a specific issue, the PR description includes Closes #xxx, where "xxx" is the issue number.
  • If changes were made to ui folder, unit tests (make test) still pass.
  • New/updated tests are included

The problem was the implementation of onEmptyResolveSuggestions callback. As Fluent API description says, it is

A callback for what should happen when suggestions are shown without input provided. Returns the already selected items so the resolver can filter them out.

In our case it was returning initial tags (() => tags) instead of filtered ones.

Screen.Recording.2023-11-16.at.18.24.52.mov

Closes #1985

Copy link
Collaborator

@mturoci mturoci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @marek-mihok! The PR looks good. The test could be more strict.

ui/src/picker.test.tsx Outdated Show resolved Hide resolved
@marek-mihok marek-mihok requested a review from mturoci November 20, 2023 10:33
@mturoci mturoci merged commit de4af7e into main Nov 20, 2023
2 checks passed
@mturoci mturoci deleted the feat/issue-1985 branch November 20, 2023 10:52
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.

Same value can be picked multiple times in ui.picker
2 participants