fix: datatable sorting issue

This commit is contained in:
pa
2025-12-29 14:39:49 +09:00
committed by Natsumi
parent cb3f4b77a8
commit 21c862a583
9 changed files with 165 additions and 213 deletions

View File

@@ -66,10 +66,7 @@ export const useGameLogStore = defineStore('GameLog', () => {
tableProps: {
stripe: true,
size: 'small',
defaultSort: {
prop: 'created_at',
order: 'descending'
},
defaultSort: null,
rowKey: (row) =>
`${row.type}:${row.rowId ?? row.uid ?? row.displayName + row.location + row.time}:${row.created_at ?? ''}`
},
@@ -398,7 +395,10 @@ export const useGameLogStore = defineStore('GameLog', () => {
if (!gameLogSearch(entry)) {
return;
}
gameLogTable.value.data.push({ ...entry, uid: crypto.randomUUID() });
gameLogTable.value.data.push({
...entry,
uid: crypto.randomUUID()
});
sweepGameLog();
uiStore.notifyMenu('game-log');
}