Toggle button on a table field

I'm thinking of using a toggle button to publish/unpublish a product in a table field. What is your view on using a toggle button and keeping a field clickable in a table?