fix: yuque dataset file folder can enter (#3593)
This commit is contained in:
@@ -49,7 +49,6 @@ const CustomAPIFileInput = () => {
|
||||
parentId: '',
|
||||
parentName: ''
|
||||
});
|
||||
const [parentUuid, setParentUuid] = useState<string>('');
|
||||
const [paths, setPaths] = useState<ParentTreePathItemType[]>([]);
|
||||
|
||||
const [searchKey, setSearchKey] = useState('');
|
||||
@@ -128,7 +127,7 @@ const CustomAPIFileInput = () => {
|
||||
|
||||
const handleItemClick = useCallback(
|
||||
(item: APIFileItem) => {
|
||||
if (item.type === 'folder') {
|
||||
if (item.canEnter) {
|
||||
setPaths((state) => [...state, { parentId: item.id, parentName: item.name }]);
|
||||
return setParent({
|
||||
parentId: item.id,
|
||||
@@ -251,6 +250,7 @@ const CustomAPIFileInput = () => {
|
||||
<Box fontSize={'sm'} fontWeight={'medium'} color={'myGray.900'}>
|
||||
{item.name}
|
||||
</Box>
|
||||
{item.canEnter && <MyIcon name="core/chat/chevronRight" w={'18px'} ml={2} />}
|
||||
</Flex>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user