mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 12:06:35 +08:00
fix: kanban tree view (#342)
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user