Make table sortable. Fixes #10962