fix: kanban tree view (#342)

This commit is contained in:
Whitewater 2022-08-29 16:25:30 +08:00 committed by GitHub
parent 7d6b552dbd
commit 2f11620221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,7 @@ export const BlockRenderProvider = ({
);
};
const useBlockRender = () => {
export const useBlockRender = () => {
const { blockRender } = useContext(BlockRenderContext);
return {
BlockRender: blockRender,

View File

@ -7,7 +7,7 @@ import type {
} from 'react';
import { forwardRef } from 'react';
import { CreateView } from '../editor';
import { BlockRender } from './Context';
import { useBlockRender } from './Context';
import { NullBlockRender } from './RenderBlock';
type WithChildrenConfig = {
@ -60,6 +60,7 @@ export const withTreeViewChildren = (
return (props: CreateView) => {
const { block } = props;
const { BlockRender } = useBlockRender();
const collapsed = block.getProperty('collapsed')?.value;
const childrenIds = block.childrenIds;
const showChildren =