Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeTable: size prop not working, even in official StackBlitz example #7269

Closed
Seyid-cmd opened this issue Sep 28, 2024 · 0 comments · Fixed by #7273
Closed

TreeTable: size prop not working, even in official StackBlitz example #7269

Seyid-cmd opened this issue Sep 28, 2024 · 0 comments · Fixed by #7273
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@Seyid-cmd
Copy link

I'm trying to use the size prop in PrimeReact's TreeTable component, but it's not having any effect. The TypeScript type indicates that the size prop should accept a number, but when I pass a value like size={10}, there's no noticeable difference in the table.

I even tried this in the official Prime React TreeTable Basic example example on StackBlitz, using the basic usage demo, but still no effect. Here's my code based on that example:

import { TreeTable } from 'primereact/treetable';
import { Column } from 'primereact/column';
export default function BasicDemo() {
  const [nodes, setNodes] = useState([]);

  useEffect(() => {
    NodeService.getTreeTableNodes().then((data) => setNodes(data));
  }, []);

  return (
    <div className="card">
      <TreeTable size={10} value={nodes} tableStyle={{ minWidth: '100rem' }}>
        <Column field="name" header="Name" expander></Column>
        <Column field="size" header="Size"></Column>
        <Column field="type" header="Type"></Column>
      </TreeTable>
    </div>
  );
}

@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 28, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Sep 28, 2024
@melloware melloware changed the title PrimeReact TreeTable size prop not working, even in official StackBlitz example TreeTable: size prop not working, even in official StackBlitz example Sep 28, 2024
melloware added a commit to melloware/primereact that referenced this issue Sep 29, 2024
@melloware melloware added this to the 10.8.4 milestone Sep 29, 2024
@melloware melloware self-assigned this Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
2 participants