-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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(useFocusTrap): support multiple refs #4022
Conversation
@@ -60,7 +61,7 @@ export interface UseFocusTrapReturn { | |||
* @see https://vueuse.org/useFocusTrap | |||
*/ | |||
export function useFocusTrap( | |||
target: MaybeElementRef, | |||
target: string | MaybeComputedElementRef | (MaybeComputedElementRef | string)[] | MaybeRefOrGetter<(MaybeComputedElementRef | string)[]>, |
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.
Modifying the type to Arrayable<MaybeRefOrGetter<string> | MaybeComputedElementRef>
seems more convenient.
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.
I didn’t realize there was such a type, thanks for pointing it out.
Before submitting the PR, please make sure you do the following
fixes #123
).Description
Support multiple refs and string array for useFocusTrap
Additional context