-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat: support multiple target on useClickAway #563
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,can you add demo and doc for this feature? thank you very much.
@brickspert Updated |
* title: Custom multiple DOM target | ||
* desc: Support pass multiple DOM elements, or functions which returns the DOM element. | ||
* | ||
* title.zh-CN: 支持多个DOM对象 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中英文之间加空格
* desc: Support pass multiple DOM elements, or functions which returns the DOM element. | ||
* | ||
* title.zh-CN: 支持多个DOM对象 | ||
* desc.zh-CN: 支持直接传入多个目标对象的方式引入。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* desc.zh-CN: 支持直接传入多个目标对象的方式引入。 | |
* desc.zh-CN: 支持传入多个目标对象。 |
@@ -34,4 +37,4 @@ useClickAway( | |||
| 参数 | 说明 | 类型 | 默认值 | | |||
|---------|----------------------------------------------|------------------------|--------| | |||
| onClickAway | 触发事件的函数 | (event) => void | - | | |||
| target | DOM 节点或者 Ref 对象 | (() => HTMLElement) \| HTMLElement \| React.MutableRefObject | - | | |||
| target | DOM 节点或者 Ref 对象或者 包含该对象的数组 | (() => HTMLElement) \| HTMLElement \| React.MutableRefObject \| ((() => HTMLElement) \| HTMLElement \| React.MutableRefObject)[] | - | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOM 节点或者 Ref 对象,支持数组
@brickspert 更新了 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.