при сужении экрана в таблице antdesign текст не переносится на следующую строку, а заезжает под границу таблицы, word-break: 'break-word;
не помогает(
Вот пример кода:
import React from "react";
import ReactDOM from "react-dom";
import "antd/dist/antd.css";
import "./index.css";
import { Table } from "antd";
const columns = [
{
title: "Name",
dataIndex: "name"
},
{
title: "Chinese Score",
dataIndex: "chinese",
sorter: {
compare: (a, b) => a.chinese - b.chinese,
multiple: 3
}
},
{
title: "Math Score",
dataIndex: "math",
sorter: {
compare: (a, b) => a.math - b.math,
multiple: 2
}
},
{
title: "English Score",
dataIndex: "english",
sorter: {
compare: (a, b) => a.english - b.english,
multiple: 1
}
}
];
const data = [
{
key: "1",
name: "John Brown",
chinese: 98,
math: 60,
english: 70
},
{
key: "2",
name: "Jim Green",
chinese: 98,
math: 66,
english: 89
},
{
key: "3",
name: "Joe Black",
chinese: 98,
math: 90,
english: 70
},
{
key: "4",
name: "Jim Red",
chinese: 88,
math: 99,
english: 89
}
];
function onChange(pagination, filters, sorter, extra) {
console.log("params", pagination, filters, sorter, extra);
}
ReactDOM.render(
<Table
columns={columns}
bordered
tableLayout="fixed"
dataSource={data}
onChange={onChange}
/>,
document.getElementById("container")
);