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

116
Views
Textfields inside the .map are not lined side by side

So the text fields of name and quantity are not side by side or not in one row after I added the .map. Initially, these two text fields would show in one row, after the .map, it would not be in one row anymore.

<Grid container rowSpacing={1} columnSpacing={{ xs: 1, sm: 2, md: 3 }}>
 {colorList.map((singleColor, index) => (
        <div key={index}>
          <Grid item xs={6}>
            <TextField
              label="name"
              name="name"
              type="text"
              id="name"
              required
              
            />
          </Grid>

          <br />

          <Grid item xs={6}>
            <TextField
              label="qty"
              name="qty"
              type="text"
            />
          </Grid>
        </div>
      ))}
  
</Grid>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This might work:

       <div className="row" key={index}>
          <Grid className="gridRow" item xs={6}>
            <TextField
              label="name"
              name="name"
              type="text"
              id="name"
              required
            />
          </Grid>

          <br />

          <Grid className="gridRow" item xs={6}>
            <TextField
              label="qty"
              name="qty"
              type="text"
            />
          </Grid>
        </div>

and your css classes should be like this:

.row {
   display: flex;
}

.gridRow {
   display: inline-block;
}
about 4 years ago · Juan Pablo Isaza 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!