mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 07:51:45 +03:00
fix: kanban tree view (#342)
This commit is contained in:
parent
7d6b552dbd
commit
2f11620221
@ -27,7 +27,7 @@ export const BlockRenderProvider = ({
|
||||
);
|
||||
};
|
||||
|
||||
const useBlockRender = () => {
|
||||
export const useBlockRender = () => {
|
||||
const { blockRender } = useContext(BlockRenderContext);
|
||||
return {
|
||||
BlockRender: blockRender,
|
||||
|
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user