Option to hide the Cancel/Save Changes buttons when editing a table

I would like an option to not show these buttons when editing a table.

In this case there is no underlying database to update.

I have a table with rows sourced from various place. I let the user enter data into cells. When the user is done entering the needed data they click a "Done" button and those rows are used when creating an object array that is passed to a bulk update query to update a another table.

Hi @bradlymethews :wave:

Happy to help you out here. When selecting and inspecting a component in the right hand pane, you can dynamically set whether to show or hide a button:

I use this frequently when attempting to run hidden work-flows or operations in the background. This can most certainly be used to hide buttons, too!

Thanks, but in this case I am referring specifically to the Cancel/Save Changes buttons on the table edit mode:

Hi @bradlymathews :wave:

So it turns out you're able to disable the save changes button doing something like this:

but unfortunately I don't think we'll be able to disable the other one apart from using some custom-css which may be a brittle solution at best.



Thanks, that looks like it will be a workable solutions.

After playing, this CSS worked, but it also hides the clear selection button. Replace tblBundledProducts with your table name:

#table-tblBundledProducts .-left .ant-btn {
  display: none

But like all CSS hacks, and as you point out, it will be brittle.

1 Like