How to hide the OK and Cancel buttons of antd Modal?
See original GitHub issueThis is a question about usage instead of issues, I’ve also posted this question on Stackoverflow here
I wrote a Login
component, which is basically as follows:
const Login = (
<Modal>
<NormalLoginForm/
...
</NormalLoginForm >
</Modal>
)
The NormalLoginForm
component is from the official website here https://ant.design/components/form/
I don’t need the two Buttons OK
and Cancel
on the Modal, how to hide the two buttons ?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Modal - Ant Design
Open Modal with customized button props. Customize footer buttons props. Passing okButtonProps and cancelButtonProps will customize the OK button and cancel ...
Read more >Reactjs – How to hide the OK and Cancel buttons of antd Modal
BTW, if you want to do Login and close the Modal by clicking one button, you need to invoke the handler function (handleOk)...
Read more >antd modal remove ok button - Code Grepper
antd modal remove ok button · disable click extra collapse antd · antd bottom up modal · antd select disable closing dropdown ·...
Read more >In Modal, Disable Cancel Button Dynamically #20514
In Modal, If I click on Ok Button and promise waiting from server response this time we also have cancel button and user...
Read more >Modal - Ant Design - GitHub Pages
Asynchronously close a modal dialog when a user clicked OK button, ... when a user clicks mask, close button on top right or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you want to disable one of them, this helps you utilize the other button implementations like
onOk
.:If anyone’s looking at this in the future, the thing you’re looking for is:
<Modal footer={null} />