fix: user group pagination reset and model image caching (#19959)
- Changed default sort order in 'Edit Group' modal to 'created_at' (newest first). Previously it sorted by group membership, causing toggled users to invisible jump to the top of the list (often changing pages). using a stable sort fixes this UX issue. - Removed unnecessary `page = 1` reset in toggleMember function so admins don't lose their place when selecting multiple users. Bug 2 - Model Image Display Bug: - Added `Cache-Control: no-cache, must-revalidate` headers to the model profile image endpoint. This ensures that when a model avatar is updated, the browser fetches the new image instead of serving a stale cached version (favicon). Fixes #19885
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
let total = null;
|
||||
|
||||
let query = '';
|
||||
let orderBy = `group_id:${groupId}`; // default sort key
|
||||
let orderBy = 'created_at'; // default sort key
|
||||
let direction = 'desc'; // default sort order
|
||||
|
||||
let page = 1;
|
||||
@@ -42,6 +42,7 @@
|
||||
orderBy = key;
|
||||
direction = 'asc';
|
||||
}
|
||||
page = 1;
|
||||
};
|
||||
|
||||
const getUserList = async () => {
|
||||
@@ -75,7 +76,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
page = 1;
|
||||
getUserList();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user