Closed TheSmedegaard closed 7 years ago
I render various datasets in the same table element with different columns(header cells) and a different amount of columns... Like this:
<th repeat.for="column of columns" aut-sort="key: column">${column}</th>
The repeat.for is no problem but how about the sorting. How can I set the right column name for each aut-sort key? I get this error:
Uncaught TypeError: Cannot read property 'toString' of undefined
I've also tried to use the custom sort function like this:
<th repeat.for="column of columns" aut-sort="custom.bind: sort">${column}</th>
But I can't figure out whether it is possible to bind the colum name to the sort function / give it an extra parameter..?
https://github.com/tochoromero/aurelia-table/issues/21 aut-sort="key.bind:column"
I'm glad the other solution worked for you :)
Me too! Thanks 👍
I render various datasets in the same table element with different columns(header cells) and a different amount of columns... Like this:
<th repeat.for="column of columns" aut-sort="key: column">${column}</th>
The repeat.for is no problem but how about the sorting. How can I set the right column name for each aut-sort key? I get this error:
Uncaught TypeError: Cannot read property 'toString' of undefined
I've also tried to use the custom sort function like this:
<th repeat.for="column of columns" aut-sort="custom.bind: sort">${column}</th>
But I can't figure out whether it is possible to bind the colum name to the sort function / give it an extra parameter..?