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

@@ -27,10 +27,7 @@ export const useFeedStore = defineStore('Feed', () => {
tableProps: {
stripe: true,
size: 'small',
defaultSort: {
prop: 'created_at',
order: 'descending'
},
defaultSort: null,
rowKey: (row) =>
`${row.type}:${row.rowId ?? row.uid}:${row.created_at ?? ''}`
},
@@ -191,7 +188,10 @@ export const useFeedStore = defineStore('Feed', () => {
if (!feedSearch(feed)) {
return;
}
feedTable.value.data.push({ ...feed, uid: crypto.randomUUID() });
feedTable.value.data.push({
...feed,
uid: crypto.randomUUID()
});
sweepFeed();
UiStore.notifyMenu('feed');
}