Closed charithAmila closed 8 months ago
import React, { useState } from 'react'; import { OrganizationChart } from 'primereact/organizationchart'; import { TreeNode } from 'primereact/treenode'; export default function BasicDoc() { const [data] = useState<TreeNode>([ // <-------------- This should be <TreeNode[]> { label: 'Argentina', expanded: true, children: [ { label: 'Argentina', expanded: true, children: [ { label: 'Argentina' }, { label: 'Croatia' } ] }, { label: 'France', expanded: true, children: [ { label: 'France' }, { label: 'Morocco' } ] } ] } ]); return ( <div className="card overflow-x-auto"> <OrganizationChart value={data} /> </div> ) }
No response
10.5.1
18.x
TypeScript
Next.js
PR is welcome!
I am working on it.
Describe the bug
Reproducer
No response
PrimeReact version
10.5.1
React version
18.x
Language
TypeScript
Build / Runtime
Next.js
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
No response