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

Dynamic mention options do not always load on the first keystroke #29

Open
taylor-tugboat opened this issue Jun 9, 2020 · 1 comment

Comments

@taylor-tugboat
Copy link

taylor-tugboat commented Jun 9, 2020

When using asynchronously loaded data, the options are not always displayed after the first keystroke. The onSearch function is still invoked, but the options do not get displayed.

Steps to reproduce:

  1. Using the story book example for this repo, on the 'dynamic' example. https://rc-mentions.react-component.now.sh/?selectedKind=rc-mentions&selectedStory=dynamic&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel
  2. Type @a. Data is fetched for the a search, but nothing is displayed
  3. Type b, data is fetched for the ab search, and results are displayed
    3a. Erase b, data is fetched for the a search, and results are displayed

After digging around a little bit in the rc-mentions code, it seems after the first keystroke, the measuring state value is still false, which might be leading to this error.

@muyiwaoyeniyi
Copy link

Please can anyone help with this?

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

No branches or pull requests

2 participants