zuiidea/antd-admin

auto focus on modal open

afvs161 opened this issue · 3 comments

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" />,
	})
}

how about use Modal not confirm

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

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