mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
Remember table sort order when switching pages
This commit is contained in:
@@ -74,11 +74,13 @@
|
||||
emits: [
|
||||
'update:currentPage',
|
||||
'update:pageSize',
|
||||
'update:tableProps',
|
||||
'size-change',
|
||||
'current-change',
|
||||
'selection-change',
|
||||
'row-click',
|
||||
'filtered-data'
|
||||
'filtered-data',
|
||||
'sort-change'
|
||||
],
|
||||
setup(props, { emit }) {
|
||||
const appearanceSettingsStore = useAppearanceSettingsStore();
|
||||
@@ -180,7 +182,14 @@
|
||||
});
|
||||
|
||||
const handleSortChange = ({ prop, order }) => {
|
||||
if (props.tableProps.defaultSort) {
|
||||
const { tableProps } = props;
|
||||
tableProps.defaultSort.prop = prop;
|
||||
tableProps.defaultSort.order = order;
|
||||
emit('update:tableProps', tableProps);
|
||||
}
|
||||
sortData.value = { prop, order };
|
||||
emit('sort-change', sortData.value);
|
||||
};
|
||||
|
||||
const handleSelectionChange = (selection) => {
|
||||
|
||||
Reference in New Issue
Block a user