React + Toast UI Grid: How to Remove a Row

As of the time of writing this article, no example showcases how to delete a row in the tui.grid documentation.

So here is a short working example.

Deleting a tui grid row with React.js

There are two simple steps to achieve this result:

  • You need to create a custom renderer that actually acts as a simple button.
  • Then create a new column that uses this renderer and handle the button click with a function that removes the element based on the row index.

You can then customize the button as you wish, add your own style, classnames to the renderer.

By the way, if this article helped you, don’t forget to clap & subscribe! 🙂
This helps me know that taking the time to write the article was worth it!

--

--