mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 17:45:22 +00:00
utils/tree-renderer: drop react-complex-tree workaround
This bug was fixed in react-complex-tree v2.0.1.
This commit is contained in:
committed by
David Lechner
parent
5afaa12df9
commit
7b9509dbf0
@@ -16,7 +16,7 @@ import {
|
||||
MaybeElement,
|
||||
} from '@blueprintjs/core';
|
||||
import React, { createContext } from 'react';
|
||||
import { TreeItem, TreeRenderProps, useTree } from 'react-complex-tree';
|
||||
import { TreeItem, TreeRenderProps } from 'react-complex-tree';
|
||||
import { useBoolean } from 'usehooks-ts';
|
||||
import { assert } from '.';
|
||||
|
||||
@@ -52,14 +52,10 @@ export type RenderProps<T extends keyof RendererFuncs> = Parameters<
|
||||
const TreeContainer: React.VoidFunctionComponent<RenderProps<'renderTreeContainer'>> = (
|
||||
props,
|
||||
) => {
|
||||
// work around https://github.com/lukasbach/react-complex-tree/issues/195
|
||||
const { treeLabel } = useTree();
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cx(Classes.TREE, Classes.FOCUS_STYLE_MANAGER_IGNORE)}
|
||||
{...props.containerProps}
|
||||
aria-label={treeLabel}
|
||||
>
|
||||
{props.children}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user