quickly add sorting via clicks on column header

This commit is contained in:
Chris Kruining 2024-12-11 11:11:28 +01:00
parent f21fa5e224
commit de79467db3
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
3 changed files with 80 additions and 4 deletions

View file

@ -22,26 +22,32 @@ export default function Experimental() {
{
id: 'name',
label: 'Name',
sortable: true,
},
{
id: 'email',
label: 'Email',
sortable: true,
},
{
id: 'address',
label: 'Address',
sortable: true,
},
{
id: 'currency',
label: 'Currency',
sortable: true,
},
{
id: 'phone',
label: 'Phone',
sortable: true,
},
{
id: 'country',
label: 'Country',
sortable: true,
},
];
@ -106,7 +112,7 @@ export default function Experimental() {
<div class={css.content}>
<Table class={css.table} rows={people} columns={columns} groupBy={store.groupBy} sort={store.sort} selectionMode={store.selectionMode}>{{
address: (cell) => <input type="text" value={cell.value} />,
// email: (cell) => <input type="email" value={cell.value} />,
}}</Table>
</div>
</div >;