Skip to content

Intent to implement: sortable tables #6057

@DerekNonGeneric

Description

@DerekNonGeneric

Proposal

I intend on creating a new component: <amp-sortable-table>, which will function as a standard <table> with extended functionality to allow its rows to be sorted by interacting with arrow icons in the table header. This behavior is commonly used in Wikipedia and is documented here.

Implementation

Wikipedia appears to be using the tablesorter jQuery plugin to achieve this. I have used this plugin in the past—it works well. Unfortunately, due to its dependence on jQuery, it is automatically not feasible for our purposes, so a vanilla version will have to be written.

Moving forward

If given the go-ahead, I could begin re-writing this plugin so that it does not depend on jQuery. Having this functionality is crucial to the success of my project and I believe the community would benefit greatly from having sortable tables.

I'm curious what you all think. Would you all consider adding a component like this if it was well-written and performant? Thank you for your consideration.

Metadata

Metadata

Labels

INTENT TO IMPLEMENTProposes implementation of a significant new feature. https://bit.ly/amp-contribute-codeType: Feature Request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions