mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
ui - instantly show changes to create key table
This commit is contained in:
parent
3875df666b
commit
04662c653f
3 changed files with 36 additions and 0 deletions
|
@ -182,6 +182,11 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
|
|||
accessToken,
|
||||
});
|
||||
|
||||
// Make refresh function available globally so CreateKey can access it
|
||||
if (typeof window !== 'undefined') {
|
||||
window.refreshKeysList = refresh;
|
||||
}
|
||||
|
||||
const handlePageChange = (newPage: number) => {
|
||||
refresh({ page: newPage });
|
||||
};
|
||||
|
@ -421,6 +426,7 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
|
|||
userRole={userRole}
|
||||
organizations={organizations}
|
||||
setCurrentOrg={setCurrentOrg}
|
||||
refresh={refresh}
|
||||
/>
|
||||
|
||||
{isDeleteModalOpen && (
|
||||
|
@ -619,4 +625,11 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
|
|||
);
|
||||
};
|
||||
|
||||
// Add this type declaration at the top of the file to avoid TypeScript errors
|
||||
declare global {
|
||||
interface Window {
|
||||
refreshKeysList?: () => void;
|
||||
}
|
||||
}
|
||||
|
||||
export default ViewKeyTable;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue