I’m using react-drag-hierarchy-tree for a project, i am facing an issue with the alignment. I have a main parernt and each child has a chlid up to a level, but by having this i have a gap between the parent’s first and second cell.

how do i make it all the same.

This is my code

import 'reactflow/dist/style.css';
import OrgTreeComponent, { useTree } from 'react-drag-hierarchy-tree';

const data = {
    id: 1,
    label: 'Main',
    children: [
      {
        id: 2,
        label: 'Parent',
        children: [
            {
                id: 3,
                label: 'child 1',
                children: [
                    {
                        id: 4,
                        label: 'child 2',

                      },
                      {
                        id: 4,
                        label: 'child 2',
                      },
                      {
                        id: 4,
                        label: 'child 2',
                      },
                      {
                        id: 4,
                        label: 'child 2',
                      },
                ],
              },
              {
                id: 3,
                label: 'child 1',
              },
              {
                id: 3,
                label: 'child 1',
              },
              {
                id: 3,
                label: 'child 1',
              },
        ],
      },
      {
        id: 2,
        label: 'Parent',
      },
      {
        id: 2,
        label: 'Parent',
      },
      {
        id: 2,
        label: 'Parent',
      },
    ],
  };
  

const CampaignStageDetails = () => {

    const { treeRef } = useTree();

    const onClick = () => {
        treeRef.current?.onExpandNodes();
      };
  
    return (
        <div>
            <OrgTreeComponent 
                data={data} 
                ref={treeRef} 
                horizontal
                collapsable={false}
                 />
        </div>
    );
}

export default CampaignStageDetails

in the reference image, i have marked with blue, i dont want that space.

Thank you

I am trying to make a table with links from one row to another

New contributor

Abdur Rahman B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.