百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

sortable-table

> 编程语言
开源

一个聚合物 Web 组件,可从嵌入式或 AJAX JSON、JSON5 和数组中生成可排序的 <table>。

194 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个聚合物 Web 组件,可从嵌入式或 AJAX JSON、JSON5 和数组中生成可排序的 <table>。

<sortable-table>

Polymer Web Component that generates a sortable <table> from JSON.

There are many capable Javascript grids, this one aims to have all the same features plus:

  • leverage native browser support for template to be fully customizable, and
  • be declaratively configurable through DOM and require no Javascript to use.

Built-In Table Features

  • Click column headers to sort
  • Drag-and-Drop columns to reorder
  • Edit rows with multi-row Undo
  • Row paging, filtering, checkbox selection, and multi-select
  • Supports table, single row/article, and flowing grid layouts
  • Use of HTML5 template for customization (Cells, Rows, Column Headers and Footers)
  • 2-way data binding with the outside world
  • Separate argument input for metadata, presentation and value calculation in all templates
  • Local or remote data: AJAX support from server-side pagination

Themes

Bootstrap

ExtJS 4

ESPN

Alternative Row / Non-Table Themes

Article

Article in Grid Mode

Live Examples and Documentation

Themes

Alternative Row Themes

Row Editor with Undo Functionality

Row Filtering

Additional Arguments

Data Formats

DOM Elements

AJAX, Server-Side Pagination

Auto-Generated Columns

Row Templates

Selected Rows, Multi-Select

Dynamically Changing Columns and Templates

Paging, Top-N Rows

Usage

  1. Add the library using the Javascript package manager Bower:

    bower install --save sortable-table

  2. Import Web Components' polyfill:

    xml
    
    
  3. Import Custom Element:

    xml
  4. Import a theme, like the Bootstrap compatible theme (Optional):

    xml

    And include class="bootstrap" on any sortable-table to apply.

  5. Start using it!

    Start simple and use DOM to configure the grid:

    xml
    
        fruit
        alice
        bill
        casey
        
        [
            [ "apple", 4, 10, 2 ],
            [ "banana", 0, 4, 0 ],
            [ "grape", 2, 3, 5 ],
            [ "pear", 4, 2, 8 ],
            [ "strawberry", 0, 14, 0 ]
        ]
    

    Or use Javascript attributes:

    xml
    
    

    Or take advanced control with custom templates, 2-way data binding, and a remote datasource:

    xml
    
        
        
    

History

For detailed changelog, check Releases.

License

MIT License © Steven Skelton

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言