Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

208
Views
Is there a way to back to line dynamically when there is not enough space while using material ui datagrid componenet?

I'm using datagrid component from material ui, I bring some data from a database and try to pass it to the datagrid component. Some fields contain long strings and not all of them appear in the column (Titre PFE) . enter image description here

What I'm trying to do is to display something like that :

Développement d’une application mobile
ecommerce

     <div style={{ height: 515, width: "100%" }}>
            <DataGrid
              rows={pfeList}
              columns={columns}
              pageSize={8}
              autoPageSize
              rowsPerPageOptions={[7]}
            />
          </div>
  const columns = [
    {
      field: "titre",
      headerName: "Titre PFE",
      headerAlign: "center",
      width: 380,
    },
.
.
.
.
.
];

What should I fix here to get the desired result?

almost 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In order to do that properly, you need to make the heights of the rows dynamic. You can add getRowHeight={() => "auto"} prop to DataGrid to make rows dynamic.

You can take a look at this sandbox for a live working example of this solution.

almost 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!