Skip to content

Commit

Permalink
fix: simple bot dataset load error (#1764)
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Jun 14, 2024
1 parent f7f4a8d commit c11131d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions projects/app/src/components/core/app/DatasetSelectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const DatasetSelectModal = ({
bg={'primary.200'}
>
<Flex alignItems={'center'} h={'38px'}>
<Avatar src={item.avatar} w={['24px', '28px']}></Avatar>
<Avatar src={item.avatar} w={['1.25rem', '1.75rem']}></Avatar>
<Box flex={'1 0 0'} w={0} className="textEllipsis" mx={3}>
{item.name}
</Box>
Expand Down Expand Up @@ -162,8 +162,8 @@ export const DatasetSelectModal = ({
w={0}
className="textEllipsis"
ml={3}
fontWeight={'bold'}
fontSize={['md', 'lg']}
fontSize={'md'}
color={'myGray.900'}
>
{item.name}
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ const EditForm = ({
() => allDatasets.filter((item) => datasets.find((dataset) => dataset.datasetId === item._id)),
[allDatasets, datasets]
);
useEffect(() => {
if (selectDatasets.length !== datasets.length) {
replaceDatasetList(
selectDatasets.map((item) => ({
datasetId: item._id
}))
);
}
}, [datasets, replaceDatasetList, selectDatasets]);
// useEffect(() => {
// if (selectDatasets.length !== datasets.length) {
// replaceDatasetList(
// selectDatasets.map((item) => ({
// datasetId: item._id
// }))
// );
// }
// }, [datasets, replaceDatasetList, selectDatasets]);

const {
isOpen: isOpenDatasetSelect,
Expand Down
1 change: 0 additions & 1 deletion projects/app/src/pages/dataset/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ const Dataset = () => {
}}
>
<MyMenu
width={120}
Button={
<Box w={'22px'} h={'22px'}>
<MyIcon
Expand Down

0 comments on commit c11131d

Please sign in to comment.