alibaba / alibaba/hooks

希望useClickAway的target可以支持css的selector选择器

Open
#2,637 3 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
TypeScript
Stars
15k
Forks
2.8k
Avg merge
15h 7m
Merged PRs (30d)
2

Description

目前useClickAway必须存在一个已渲染完成的dom作为target,但有时候target是动态创建的,不知道什么时候才渲染ok, 但当有点击事件的时候再去判断点击事件是否在指定选择器内部

Contributor guide

Open the contributing guide

Research direction

Start at the useClickAway entry point and review how its target is currently resolved and checked. Define how a CSS selector target should be accepted and evaluated when the DOM is created later, then verify that clicks inside and outside the selected element produce the expected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.