react-component / react-component/mentions
Pressing enter on not found causes a javascript error
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 112
- Forks
- 65
- Avg merge
- 28m
- Merged PRs (30d)
- 2
Description
- Go to https://react-component.github.io/mentions/?selectedKind=rc-mentions&selectedStory=dynamic&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Fsource%2Fpanel
- Type @dfadfdfadfdfadfdfdsfasd (or any string that won’t be found)
- Wait until it says Not Found
- Press enter
Initially it looks like https://github.com/react-component/mentions/blob/master/src/Mentions.tsx should check for a valid option
} else if (which === KeyCode.ENTER) {
// Measure hit
const option = this.getOptions()[activeIndex];
this.selectOption(option);
event.preventDefault();
}
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
Reproduce the failure using the linked Mentions Storybook URL with a search string that returns Not Found, then inspect the Enter-key handling in src/Mentions.tsx. Confirm the fix by pressing Enter after no option is available and verifying that no JavaScript error occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100