A
A
Alexander Knyazev2017-06-22 11:08:19
JavaScript
Alexander Knyazev, 2017-06-22 11:08:19

How to create a table with multi-row cells in React-bootstrap?

I need to create a table with cells containing several rows, I do it like this:

<Table bordered>
                    <thead>
                        <tr>
                            <th>Date</th>
                            <th>Analysed ID</th>
                            <th>Analysed Name</th>
                            <th>Solve To change</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td rowSpan="3">Date</td>
                        </tr>
                        <tr>
                            <td>ID</td>
                            <td>Name</td>
                            <td>Decision</td>
                        </tr>
                        <tr>
                            <td>ID</td>
                            <td>Name</td>
                            <td>Decision</td>
                        </tr>
                    </tbody>
                </Table>

It works, I get the following table:
a2e367327c1245b3956cd5d4f52130d2.png
Now I need to put three trs into a separate component in order to create many such lines during iteration, but the component must return content in a single tag, I tried to put all three trs into the parent tr, it gives an error. I don't know how to solve the problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Knyazev, 2017-06-22
@alexandrknyazev13071995

A solution was suggested here:
https://stackoverflow.com/questions/44694024/how-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question