mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 00:53:14 +00:00
Fix: Minimise sidebar on nav item click on Mobile
This commit is contained in:
@@ -11,6 +11,7 @@ type Props = {
|
||||
isDocsListOpen: boolean;
|
||||
setIsDocsListOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
handleDeleteClick: any;
|
||||
handlePostDocumentSelect: any;
|
||||
};
|
||||
|
||||
function SourceDropdown({
|
||||
@@ -20,6 +21,7 @@ function SourceDropdown({
|
||||
setIsDocsListOpen,
|
||||
isDocsListOpen,
|
||||
handleDeleteClick,
|
||||
handlePostDocumentSelect, // Callback function fired after a document is selected
|
||||
}: Props) {
|
||||
const dispatch = useDispatch();
|
||||
const { t } = useTranslation();
|
||||
@@ -85,6 +87,7 @@ function SourceDropdown({
|
||||
onClick={() => {
|
||||
dispatch(setSelectedDocs(option));
|
||||
setIsDocsListOpen(false);
|
||||
handlePostDocumentSelect(option);
|
||||
}}
|
||||
>
|
||||
<span
|
||||
|
||||
Reference in New Issue
Block a user