Skip to content

Commit

Permalink
feat: add sorted prop (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
elf-mouse committed Feb 15, 2023
1 parent f4f519e commit 9892db0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scripts/components/table/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export default {
MIN: 'min'
},
EVENT: {
SELECTED: 'selected'
SELECTED: 'selected',
SORTED: 'sorted'
},
CHECKBOX_COL_WIDTH: 50 // px
};
2 changes: 2 additions & 0 deletions src/scripts/components/table/table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ export default {
this.$table.listen(events.SORTED, ({ detail }) => {
// TODO: multi-row header is unsupported
this.handleSort(detail);
this.$emit(UI_TABLE.EVENT.SORTED, detail);
});
if (this.selectedRows.length) {
Expand Down

0 comments on commit 9892db0

Please sign in to comment.