Closed gertcuykens closed 9 years ago
A couple things need to be exact for this to work:
1: columns
needs to be defined within the sortable-table
attributes (and not within the indexeddb-fruit
attributes).
The indexeddb-fruit
is blindly returning each row from the indexeddb store to the grid, so the grid will display all of the rows if it doesn't have a columns
defined.
I'd create generic logic to do this properly, but the entire indexeddb datasource is necessarily very specific, since something needs to load all the data into it and create the proper indexes. Maybe in the future, but to be honest I don't have a need for it so it's a rather low priority :grimacing:
2: When loading attributes, only valid JSON can be used, JSON5 doesn't work. So in your code "cellTemplate" needs to be quoted, otherwise it won't parse as an Array.
This seem to be broken
<indexeddb-fruit role="datasource"> </indexeddb-fruit>
I need to add something in columns before it start working likecolumns='[{"name":"name", cellTemplate: "fruitsTemplate"}]'
note that it also ignores the content of column, it always shows all columns or none.