mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix dataset card not responding to click events (#9574)
### What problem does this PR solve? Fix home card not responding to click events ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):
This commit is contained in:
@ -77,7 +77,7 @@ export const useNavigatePage = () => {
|
|||||||
}, [navigate]);
|
}, [navigate]);
|
||||||
|
|
||||||
const navigateToSearch = useCallback(
|
const navigateToSearch = useCallback(
|
||||||
(id: string) => {
|
(id: string) => () => {
|
||||||
navigate(`${Routes.Search}/${id}`);
|
navigate(`${Routes.Search}/${id}`);
|
||||||
},
|
},
|
||||||
[navigate],
|
[navigate],
|
||||||
|
|||||||
@ -182,8 +182,8 @@ export default {
|
|||||||
<b>元数据为:</b><br>
|
<b>元数据为:</b><br>
|
||||||
<code>
|
<code>
|
||||||
{
|
{
|
||||||
“作者”:“Alex Dowson”,
|
"作者": "Alex Dowson",
|
||||||
“日期”:“2024-11-12”
|
"日期": "2024-11-12"
|
||||||
}
|
}
|
||||||
</code><br>
|
</code><br>
|
||||||
<b>提示将为:</b><br>
|
<b>提示将为:</b><br>
|
||||||
|
|||||||
@ -20,9 +20,7 @@ export function AgentCard({ data, showAgentRenameModal }: DatasetCardProps) {
|
|||||||
<MoreButton></MoreButton>
|
<MoreButton></MoreButton>
|
||||||
</AgentDropdown>
|
</AgentDropdown>
|
||||||
}
|
}
|
||||||
onClick={() => {
|
onClick={navigateToAgent(data?.id)}
|
||||||
navigateToAgent(data?.id);
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,9 +32,7 @@ export function DatasetCard({
|
|||||||
<MoreButton></MoreButton>
|
<MoreButton></MoreButton>
|
||||||
</DatasetDropdown>
|
</DatasetDropdown>
|
||||||
}
|
}
|
||||||
onClick={() => {
|
onClick={navigateToDataset(dataset.id)}
|
||||||
navigateToDataset(dataset.id);
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ export function SearchList() {
|
|||||||
title: x.name,
|
title: x.name,
|
||||||
update_time: x.update_time,
|
update_time: x.update_time,
|
||||||
}}
|
}}
|
||||||
onClick={() => navigateToSearch(x.id)}
|
onClick={navigateToSearch(x.id)}
|
||||||
></ApplicationCard>
|
></ApplicationCard>
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,9 +25,7 @@ export function ChatCard({ data, showChatRenameModal }: IProps) {
|
|||||||
<MoreButton></MoreButton>
|
<MoreButton></MoreButton>
|
||||||
</ChatDropdown>
|
</ChatDropdown>
|
||||||
}
|
}
|
||||||
onClick={() => {
|
onClick={navigateToChat(data?.id)}
|
||||||
navigateToChat(data?.id);
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,7 +85,7 @@ export default function SearchList() {
|
|||||||
res = await createSearch({ name: values.name });
|
res = await createSearch({ name: values.name });
|
||||||
}
|
}
|
||||||
if (res && !searchData?.id) {
|
if (res && !searchData?.id) {
|
||||||
navigateToSearch(res?.search_id);
|
navigateToSearch(res?.search_id)();
|
||||||
}
|
}
|
||||||
if (!isLoading) {
|
if (!isLoading) {
|
||||||
setOpenCreateModal(false);
|
setOpenCreateModal(false);
|
||||||
|
|||||||
@ -22,9 +22,7 @@ export function SearchCard({ data, showSearchRenameModal }: IProps) {
|
|||||||
<MoreButton></MoreButton>
|
<MoreButton></MoreButton>
|
||||||
</SearchDropdown>
|
</SearchDropdown>
|
||||||
}
|
}
|
||||||
onClick={() => {
|
onClick={navigateToSearch(data?.id)}
|
||||||
navigateToSearch(data?.id);
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user