希望 useClickAway 支持条件化触发
Open
- Dominant language
- TypeScript
- Stars
- 15k
- Forks
- 2.8k
- Avg merge
- 15h 7m
- Merged PRs (30d)
- 2
Description
目前useClickAway不支持条件化触发,希望添加一个enbale配置(默认为true),只有当true时才触发函数执行。在写弹窗的逻辑时就遇到这个问题了,弹窗使用open控制是否打开,在组件里面使用useClickAway() 即使做了open状态仍无效
Contributor guide
Research direction
Start by locating the useClickAway hook and its existing options or API entry point. Add the requested enable option with true as the default, then verify that the click-away callback runs only when enable is true and that the popup open state can control it as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100