Table tag for MDL/CE that allows you to work with tables.
Here'a a sort list of features we want to see:
- Sort
- Filter
- Column hide/unhide move via D&D
- CRUD
- Inline edit
- Multiple actions
- D&D ...
- And so on...
This tag is intended to work from mobile to big screens...
Let's stop dreaming, and beging to work! :)
Roadmap:
- Render data:
- via JS
- via HTML? does it have any sense?
- Manipulate info
- CRUD
The tag var table = <x-table></x-table>
has the following properties:
- data property:
table.data = [ [x1, x2, x3...], [y1, y2, y3...] ...];
Render a table with values
x1 x2 x3...
y1 y2 y3...
...
- filter property:
table.filter = "string";
Hide these rows which don't contain the string in their text.
- filtered property:
table.filered;
Read-only array. Expose only the filtered values where filter is given by table.filter = "string";
- sort property:
table.sort = "column1,-column2";
table.sort = ["column1", "-column2"];
var sort = new Set();
sort.add("column1");
sort.add("-column2");
table.sort = sort;
This property accepts different formats in comformance with JSON API sorting.
- columns property:
table.columns = ['Column1', 'Column2', ... 'ColumnN'];
Notice that the columns variable is a Set.