DataGrid.svelte Svelte Themes

Datagrid.svelte

A basic svelte datagrid component with some features (sort, filter, events)

DataGrid.svelte

A basic svelte datagrid component with some advanced features (sort, filter, events)

Demo

Here is a live demo: https://bassem-essam.github.io/DataGrid.svelte/

Features

  • Advanced filtering options using javascript code
  • Sortable data
  • Ability to add event handlers (on:rowClick, on:rowDoubleClick, on:cellClick, on:headCellClick)

Usage

  1. clone this repository
  2. copy the entire datagrid folder into your svelte project under /lib directory probably
  3. import DataGrid component and use it directly

Learning Outcomes

  1. How to make a minimal event system
  2. svelte/store is the best

TODOs

  • Add typescript (or at least make events
  • Refactor the code

Advice

Use TanStack or something similar to build your datagrid component as I guess it may offer customizability and good features out of the box.

License

This code is your responsibility now

Top categories

Loading Svelte Themes