Skip to content
项目

关于

LiveTable helps you build realtime datatables for the web

网站与应用开发

这些数字如何统计

可以做什么

  • Advanced Filtering - Text search, range filters, select dropdowns, boolean toggles, and transformers
  • Smart Sorting - Multi-column sorting with shift-click support
  • Flexible Pagination - Standard pagination or infinite scroll
  • Export Capabilities - CSV and PDF exports, served as a direct download

实测星标增长

24小时
0
7天
+1
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

LiveTable

A Phoenix LiveView component library for building dynamic, interactive data tables with real-time updates.

Hex.pm Documentation

Features

  • Advanced Filtering - Text search, range filters, select dropdowns, boolean toggles, and transformers
  • Smart Sorting - Multi-column sorting with shift-click support
  • Flexible Pagination - Standard pagination or infinite scroll
  • Export Capabilities - CSV and PDF exports, served as a direct download
  • Real-time Updates - Built for Phoenix LiveView with instant feedback
  • Multiple View Modes - Table and card layouts with custom components
  • Complex Queries - Full support for joins, aggregations, and computed fields

LiveTable Demo

Live Demo (1M+ records) | Advanced Demo | Advanced Demo Source

Quick Start

1. Add dependency:

# mix.exs
{:live_table, "~> 0.5.0"}

2. Install:

mix deps.get && mix live_table.install && mix sutra_ui.install

The installer adds Sutra UI, the recommended UI components. Prefer your own? Remove sutra_ui and see Custom Components.

3. Create a table:

# lib/my_app_web/live/product_live/index.ex
defmodule MyAppWeb.ProductLive.Index do
  use MyAppWeb, :live_view
  use LiveTable.LiveResource, schema: MyApp.Product

  def fields do
    [
      id: %{label: "ID", sortable: true},
      name: %{label: "Name", sortable: true, searchable: true},
      price: %{label: "Price", sortable: true}
    ]
  end

  def filters do
    [
      in_stock: Boolean.new(:quantity, "in_stock", %{
        label: "In Stock",
        condition: dynamic([p], p.quantity > 0)
      })
    ]
  end
end

4. Render it:

<%# lib/my_app_web/live/product_live/index.html.heex %>
<.live_table fields={fields()} filters={filters()} options={@options} streams={@streams} />

Documentation

Full Documentation on HexDocs

AI/LLM Integration

LiveTable includes usage rules for AI assistants to provide accurate code suggestions.

License

MIT License. See LICENSE for details.

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Open a Pull Request

Support

探索相关项目

加载中…