react-component / react-component/mentions
Dynamic mention options do not always load on the first keystroke
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 112
- Forks
- 65
- Avg merge
- 28m
- Merged PRs (30d)
- 2
Description
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:
- 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
- Type
@a. Data is fetched for theasearch, but nothing is displayed - Type
b, data is fetched for theabsearch, and results are displayed
3a. Erase b, data is fetched for theasearch, 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Storybook dynamic example and reproduce the first-keystroke failure using the listed @a, b, and erase steps. Then inspect the rc-mentions code around the onSearch handling and measuring state; done means asynchronously loaded options appear after the initial search as well as later searches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100