Skip to content

Commit

Permalink
Example for responsive table changed ( Fixing issue #5313) (#5314)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaylaud committed Jul 21, 2020
1 parent 3960106 commit 26ee2b9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
36 changes: 12 additions & 24 deletions www/src/examples/Table/Responsive.js
Expand Up @@ -2,41 +2,29 @@
<thead>
<tr>
<th>#</th>
<th>Table heading</th>
<th>Table heading</th>
<th>Table heading</th>
<th>Table heading</th>
<th>Table heading</th>
<th>Table heading</th>
{Array.from({ length: 12 }).map((_, index) => (
<th key={index}>Table heading</th>
))}
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
{Array.from({ length: 12 }).map((_, index) => (
<td key={index}>Table cell {index}</td>
))}
</tr>
<tr>
<td>2</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
{Array.from({ length: 12 }).map((_, index) => (
<td key={index}>Table cell {index}</td>
))}
</tr>
<tr>
<td>3</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
{Array.from({ length: 12 }).map((_, index) => (
<td key={index}>Table cell {index}</td>
))}
</tr>
</tbody>
</Table>;
3 changes: 2 additions & 1 deletion www/src/pages/components/table.js
Expand Up @@ -59,7 +59,8 @@ export default withLayout(function TableSection({ data }) {
<p>
Across every breakpoint, use <code>responsive</code> for horizontally
scrolling tables. Responsive tables are wrapped automatically in a{' '}
<code>div</code>.
<code>div</code>. The following example has 12 columns that are
scrollable horizontally.
</p>
<ReactPlayground codeText={TableResponsive} />

Expand Down

0 comments on commit 26ee2b9

Please sign in to comment.