Ask Your Question
1

How can I eliminate the dividing line between rows in a table using Ant Design?

asked 2022-07-31 11:00:00 +0000

lakamha gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-09-28 12:00:00 +0000

ladyg gravatar image

You can eliminate the dividing line between rows in a table using Ant Design by adding the "bordered" attribute to the Table component and setting it to false. Here's an example:

import { Table } from 'antd';

const data = [
  { key: '1', name: 'John Doe', age: 30 },
  { key: '2', name: 'Jane Smith', age: 25 },
  { key: '3', name: 'Bob Johnson', age: 40 },
];

const columns = [
  { title: 'Name', dataIndex: 'name', key: 'name' },
  { title: 'Age', dataIndex: 'age', key: 'age' },
];

<Table dataSource={data} columns={columns} bordered={false} />;

Setting the "bordered" attribute to false will remove the dividing line between rows in the table.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-07-31 11:00:00 +0000

Seen: 12 times

Last updated: Sep 28 '22