diff --git a/front/components/assistant_builder/AssistantBuilderDataSourceModal.tsx b/front/components/assistant_builder/AssistantBuilderDataSourceModal.tsx index 5e6b04ea556f..4eb5bce97c14 100644 --- a/front/components/assistant_builder/AssistantBuilderDataSourceModal.tsx +++ b/front/components/assistant_builder/AssistantBuilderDataSourceModal.tsx @@ -1,4 +1,5 @@ import { + ChevronLeftIcon, CloudArrowDownIcon, CloudArrowLeftRightIcon, Item, @@ -50,12 +51,16 @@ export default function AssistantBuilderDataSourceModal({ } }, [dataSourceToManage]); + const onReset = () => { + setSelectedDataSource(null); + setSelectedResources({}); + setIsSelectAll(false); + }; + const onClose = () => { setOpen(false); setTimeout(() => { - setSelectedDataSource(null); - setSelectedResources({}); - setIsSelectAll(false); + onReset(); }, 200); }; @@ -77,7 +82,7 @@ export default function AssistantBuilderDataSourceModal({ return ( onSaveLocal({ isSelectAll })} hasChanged={ !!selectedDataSource &&