Skip to content
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

auto focus on modal open #1163

Closed
afvs161 opened this issue Apr 7, 2024 · 3 comments
Closed

auto focus on modal open #1163

afvs161 opened this issue Apr 7, 2024 · 3 comments

Comments

@afvs161
Copy link

afvs161 commented Apr 7, 2024

How to focus to this input after modal has been opened? I can't use useRef cause it's not a component and autoFocus is not working, probably cause I have to click button to open this modal

export const payModal = () => {
	confirm({
		icon: " ",
		title: <Input type="text" />,
	})
}
@superlbr
Copy link
Collaborator

superlbr commented Apr 7, 2024

how about use Modal not confirm

Repository owner deleted a comment from LDD123 Apr 7, 2024
@afvs161
Copy link
Author

afvs161 commented Apr 8, 2024

it's just that confirm was a better fit for my case, yes I can customize modal and use it

@superlbr
Copy link
Collaborator

then it's not a problem。。
antd related pls go to ant-design

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants