diff --git a/.changeset/treeview-docs.md b/.changeset/treeview-docs.md new file mode 100644 index 000000000..78bceb0cc --- /dev/null +++ b/.changeset/treeview-docs.md @@ -0,0 +1,5 @@ +--- +"react-magma-docs": patch +--- + +docs(TreeView): Update example with duplicate IDs \ No newline at end of file diff --git a/packages/react-magma-dom/src/components/TreeView/useTreeItem.ts b/packages/react-magma-dom/src/components/TreeView/useTreeItem.ts index c6b1fa2a9..5c80323c0 100644 --- a/packages/react-magma-dom/src/components/TreeView/useTreeItem.ts +++ b/packages/react-magma-dom/src/components/TreeView/useTreeItem.ts @@ -74,6 +74,8 @@ export interface UseTreeItemProps extends React.HTMLAttributes { */ itemDepth?: number; /** + * TODO: improve functionality (issue #1305) + * @internal * If true, element is disabled * @default false */ @@ -146,7 +148,7 @@ export function useTreeItem(props: UseTreeItemProps, forwardedRef) { (child: React.ReactElement) => child.type === TreeItem ); - // TODO fix for disabled items + // TODO fix for disabled items (issue #1305) // const numberOfTreeItemChildren = getEnabledTreeItemChildrenLength(treeItemChildren); const numberOfTreeItemChildren = treeItemChildren.length; const hasOwnTreeItems = numberOfTreeItemChildren > 0; diff --git a/website/react-magma-docs/src/pages/api/tree-view.mdx b/website/react-magma-docs/src/pages/api/tree-view.mdx index dc199feb8..fd3343a6a 100644 --- a/website/react-magma-docs/src/pages/api/tree-view.mdx +++ b/website/react-magma-docs/src/pages/api/tree-view.mdx @@ -33,7 +33,7 @@ export function Example() { > Art History in the 21st Century} - itemId="I-intro" + itemId="I-21st-century" > The Questions Art Historians Ask}