Skip to content

DataTable expanded rows alignment #2124

Discussion options

You must be logged in to vote

Here's a short, not tested and AI generated code block to give you a brief idea what I'm talking about:

Expand to see code:

AI generated code to get an idea
import React, { useState } from 'react';
import { DataTable } from 'primereact/datatable';
import { Column } from 'primereact/column';
import { Button } from 'primereact/button';

// Initial Data
const initialData = [
    { id: 1, name: 'Parent 1', expanded: false, children: [
        { id: 101, name: 'Child 1.1' },
        { id: 102, name: 'Child 1.2' }
    ]},
    { id: 2, name: 'Parent 2', expanded: false, children: [
        { id: 201, name: 'Child 2.1' },
        { id: 202, name: 'Child 2.2' }
    ]}
];

const App = () => {
    c…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sja-cslab
Comment options

Answer selected by melloware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
2 participants