fix: empty kb

This commit is contained in:
archer 2023-09-04 15:47:01 +08:00
parent 94c53804ce
commit 8dba2c39e1
No known key found for this signature in database
GPG Key ID: 569A5660D2379E28
2 changed files with 7 additions and 2 deletions

View File

@ -570,7 +570,7 @@ const AppEdit = ({ app, onCloseSettings }: Props) => {
fitView
nodes={nodes}
edges={edges}
minZoom={0.4}
minZoom={0.1}
maxZoom={1.5}
defaultEdgeOptions={edgeOptions}
connectionLineStyle={connectionLineStyle}

View File

@ -128,8 +128,13 @@ export const KBSelectModal = ({
<ModalFooter>
<Button
onClick={() => {
// filter out the kb that is not in the kbList
const filterKbList = selectedKbList.filter((kb) => {
return kbList.find((item) => item._id === kb.kbId);
});
onClose();
onChange(selectedKbList);
onChange(filterKbList);
}}
>