tochoromero / aurelia-table

Simple functional data table for Aurelia
https://tochoromero.github.com/aurelia-table
MIT License
67 stars 25 forks source link

Allow empty au-sort attribute #53

Closed jpravetz closed 6 years ago

jpravetz commented 6 years ago

This change allows table columns to be generated using an iterator. For example (using PUG notation): th(repeat.for='col of cols' aut-sort='key.bind: col.sortField') can leave it up to individual columns to decide whether there is a key to be bound. The workaround is to declare two th attributes, one with if.bind='col.sortField' and the other without. Summary: I think throwing an exception is not necessary. Just ignore the attribute if it doesn't contain a key nor custom attribute.