Screencast

10. Sortable table with Sortable JS

sortabletable

Sortable table with Sortable JS

Unlock the full screencast.

Starter Kit + every episode + weekly deep dives. One payment, lifetime access.

Get Starter Kit + Access

Reordering items directly in the user interface is a feature that can greatly enhance the user experience in web applications. In this video, I'll walk you through how to implement sortable table rows in your Phoenix LiveView application. We'll start by setting up a way to store the sorting position of each post in the database. Then, we'll integrate the Sortable.js library to handle the drag-and-drop functionality on the client side. By the end of this tutorial, you'll have a fully functional sortable table that persists the order of your items. Let's get started.