Skip to content

Commit

Permalink
feat(FR-368): Update folder list Immediately after creating a new fol…
Browse files Browse the repository at this point in the history
…der.
  • Loading branch information
agatha197 committed Jan 20, 2025
1 parent 5e36c40 commit dba9631
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions react/src/components/FolderCreateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ const FolderCreateModal: React.FC<FolderCreateModalProps> = ({
document.dispatchEvent(
new CustomEvent('backend-ai-folder-list-changed'),
);
document.dispatchEvent(
new CustomEvent('backend-ai-folder-updated'),
);
onRequestClose(result);
},
onError: (error) => {
Expand Down
3 changes: 3 additions & 0 deletions src/components/backend-ai-storage-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,9 @@ export default class BackendAiStorageList extends BackendAIPage {
document.addEventListener('backend-ai-group-changed', (e) =>
this._refreshFolderList(true, 'group-changed'),
);
document.addEventListener('backend-ai-folder-updated', (e) =>
this._refreshFolderList(true, 'folder-updated'),
);
}

_isUncontrollableStatus(status: VFolderOperationStatus) {
Expand Down

0 comments on commit dba9631

Please sign in to comment.