rare-sapphire
rare-sapphire3w ago

save and delete buttons remove?

How do I delete the save and delete buttons on the Edit page?
2 Replies
kapa.ai
kapa.ai3w ago
Hi @florent. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To remove the save and delete buttons on the Edit page in refine, you can customize the footerButtons prop of the <Edit> component. Here's how you can do it:
import { Edit } from "@refinedev/mui";

const PostEdit: React.FC = () => {
return (
<Edit
footerButtons={() => (
<></>
)}
>
<p>Rest of your page here</p>
</Edit>
);
};
import { Edit } from "@refinedev/mui";

const PostEdit: React.FC = () => {
return (
<Edit
footerButtons={() => (
<></>
)}
>
<p>Rest of your page here</p>
</Edit>
);
};
By passing an empty fragment (<></>) to the footerButtons prop, you effectively remove both the save and delete buttons from the footer of the Edit page. This approach works for various UI frameworks supported by refine, including Material UI, Ant Design, Mantine, and Chakra UI. The basic concept remains the same, but the import statement might differ based on the UI framework you're using. For more detailed information on customizing footer buttons, you can refer to the following documentation: Edit Component (Material UI) Remember that removing these buttons might affect the user experience, so make sure to provide alternative ways to save or delete if necessary. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@1184365192482652173> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?