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

Issue #140, part 2 - Fix issue where input would error out if selected value went missing #157

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joeyparis
Copy link

This is a very similar issue to #140 (fixed by #141), but later in the life cycle.

Scenario:

  1. Array of selected values already available
  2. Actual options are still waiting for an API call (fix issue #140 #141 fixed this leading to the code breaking)
  3. Initial API results are displayed with the now available matched values
  4. A new API request is made via search, and the previously matched values are missing (This pull request fixes the code breaking)
  5. Previously matched values are returned and once again marked as selected

As @tbleckert mentioned here, this is more of a patch than it is an actual fix. But still probably worth merging in for the time being, and then keeping in mind for the real solution with getOption when used with getDisplayValue and isSelected.

@vercel
Copy link

vercel bot commented Dec 29, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tbleckert/react-select-search/BEzzoagNSuJG8Zciko3rQmhnnEWX
✅ Preview: https://react-select-search-git-fork-joeyparis-fix-iss-09f7b5-tbleckert.vercel.app

Base automatically changed from master to main January 29, 2021 07:41
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