Sortable Lists for Blazor using a SortableJS Component
- A common feature for web apps is sortable lists, and to address this need, Burke Holland created a Blazor component called Bazor Sortable, which is based on the SortableJS library.
- SortableJS is a powerful library that allows the creation of sortable lists with features like sorting, sorting between lists, cloning items, filtering, and custom animation easing.
- The Blazor Sortable component is a generic component that takes a list of items and a template for rendering each item in the sortable list.
- The component makes use of SortableJS to enable drag and drop functionality for the list items.
- To handle the sorting of the list, the component provides an
OnSort
event that can be used to update the list order.
- SortableJS supports sorting between lists, cloning items, and filtering, among other features.
- However, it should be noted that SortableJS has limited styling options and uses HTML5 drag and drop, falling back to a JavaScript solution on platforms like iOS.