Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into docs_replace_class
Browse files Browse the repository at this point in the history
  • Loading branch information
poyiding committed May 11, 2022
2 parents f6f2bf6 + fbdcbc7 commit c3a38d0
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 14 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.en-US.md
Expand Up @@ -15,6 +15,14 @@ timeline: true

---

## 4.20.4

`2022-05-11`

- 🐞 Fix broken List.Item type definition. [#35455](https://github.com/ant-design/ant-design/pull/35455) [@rsmeral](https://github.com/rsmeral)
- 🐞 Fix Checkbox margin in Tree RTL mode. [#35491](https://github.com/ant-design/ant-design/pull/35491) [@miracles1919](https://github.com/miracles1919)
- 🗑 Remove Cascader `displayRender` warning. [#35417](https://github.com/ant-design/ant-design/pull/35417) [@lalalazero](https://github.com/lalalazero)

## 4.20.3

`2022-05-08`
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.zh-CN.md
Expand Up @@ -15,6 +15,14 @@ timeline: true

---

## 4.20.4

`2022-05-11`

- 🐞 修复 List.Item 类型错误。[#35455](https://github.com/ant-design/ant-design/pull/35455) [@rsmeral](https://github.com/rsmeral)
- 🐞 修复 Tree 组件 RTL 模式下 Checkbox 的间距。[#35491](https://github.com/ant-design/ant-design/pull/35491) [@miracles1919](https://github.com/miracles1919)
- 🗑 删除 Cascader `displayRender` 警告。[#35417](https://github.com/ant-design/ant-design/pull/35417) [@lalalazero](https://github.com/lalalazero)

## 4.20.3

`2022-05-08`
Expand Down
7 changes: 4 additions & 3 deletions components/menu/index.en-US.md
Expand Up @@ -29,11 +29,12 @@ ReactDOM.render(<Alert message="After version 4.20.0, we provide a simpler usage
```jsx
// works when >=4.20.0, recommended ✅
const items = [
{ label: 'item 1' },
{ label: 'item 2' },
{ label: 'item 1', key: 'item-1' }, // remember to pass the key prop
{ label: 'item 2', key: 'item-2' }, // which is required
{
label: 'sub menu',
children: [{ label: 'item 3' }],
key: 'submenu'
children: [{ label: 'item 3', key: 'submenu-item-1' }],
},
];
return <Menu items={items} />;
Expand Down
7 changes: 4 additions & 3 deletions components/menu/index.zh-CN.md
Expand Up @@ -30,11 +30,12 @@ ReactDOM.render(<Alert message="在 4.20.0 版本后,我们提供了 <Menu ite
```jsx
// >=4.20.0 可用,推荐的写法 ✅
const items = [
{ label: '菜单项一' },
{ label: '菜单项二' },
{ label: '菜单项一', key: 'item-1' }, // 菜单项务必填写 key
{ label: '菜单项二', key: 'item-2' },
{
label: '子菜单',
children: [{ label: '子菜单项' }],
key: 'submenu',
children: [{ label: '子菜单项', key: 'submenu-item-1' }],
},
];
return <Menu items={items} />;
Expand Down
5 changes: 4 additions & 1 deletion components/table/index.en-US.md
Expand Up @@ -128,7 +128,6 @@ One of the Table `columns` prop for describing the table's columns, Column has t
| defaultFilteredValue | Default filtered values | string\[] | - | |
| filterResetToDefaultFilteredValue | click the reset button, whether to restore the default filter | boolean | false | |
| defaultSortOrder | Default order of sorted values | `ascend` \| `descend` | - | |
| editable | Whether column can be edited | boolean | false | |
| ellipsis | The ellipsis cell content, not working with sorter and filters for now.<br />tableLayout would be `fixed` when `ellipsis` is `true` or `{ showTitle?: boolean }` | boolean \| {showTitle?: boolean } | false | showTitle: 4.3.0 |
| filterDropdown | Customized filter overlay | ReactNode \| (props: [FilterDropdownProps](https://github.com/ant-design/ant-design/blob/ecc54dda839619e921c0ace530408871f0281c2a/components/table/interface.tsx#L79)) => ReactNode | - | |
| filterDropdownVisible | Whether `filterDropdown` is visible | boolean | - | |
Expand Down Expand Up @@ -317,3 +316,7 @@ Table can not tell what state used in `columns.render`, so it always need fully
### How to handle fixed column display over the mask layout?

Fixed column use `z-index` to make it over other columns. You will find sometime fixed columns also over your mask layout. You can set `z-index` on your mask layout to resolve.

### How to custom render Table Checkbox(For example, adding Tooltip)?

Since `4.1.0`, You can use [`rowSelection.renderCell`](https://ant.design/components/table/#rowSelection) to custom render Table Checkbox. If you want to add Tooltip, please refer to this [demo](https://codesandbox.io/s/table-row-tooltip-v79j2v).
6 changes: 4 additions & 2 deletions components/table/index.zh-CN.md
Expand Up @@ -63,7 +63,6 @@ const columns = [

## API


### Table

| 参数 | 说明 | 类型 | 默认值 | 版本 |
Expand Down Expand Up @@ -130,7 +129,6 @@ const columns = [
| defaultFilteredValue | 默认筛选值 | string\[] | - | |
| filterResetToDefaultFilteredValue | 点击重置按钮的时候,是否恢复默认筛选值 | boolean | false | |
| defaultSortOrder | 默认排序顺序 | `ascend` \| `descend` | - | |
| editable | 是否可编辑 | boolean | false | |
| ellipsis | 超过宽度将自动省略,暂不支持和排序筛选一起使用。<br />设置为 `true``{ showTitle?: boolean }` 时,表格布局将变成 `tableLayout="fixed"`| boolean \| { showTitle?: boolean } | false | showTitle: 4.3.0 |
| filterDropdown | 可以自定义筛选菜单,此函数只负责渲染图层,需要自行编写各种交互 | ReactNode \| (props: [FilterDropdownProps](https://github.com/ant-design/ant-design/blob/ecc54dda839619e921c0ace530408871f0281c2a/components/table/interface.tsx#L79)) => ReactNode | - | |
| filterDropdownVisible | 用于控制自定义筛选菜单是否可见 | boolean | - | |
Expand Down Expand Up @@ -318,3 +316,7 @@ Table 移除了在 v3 中废弃的 `onRowClick`、`onRowDoubleClick`、`onRowMou
### 固定列穿透到最上层该怎么办?

固定列通过 `z-index` 属性将其悬浮于非固定列之上,这使得有时候你会发现在 Table 上放置遮罩层时固定列会被透过的情况。为遮罩层设置更高的 `z-index` 覆盖住固定列即可。

### 如何自定义渲染可选列的勾选框(比如增加 Tooltip)?

`4.1.0` 起,可以通过 [rowSelection](https://ant.design/components/table-cn/#rowSelection)`renderCell` 属性控制,可以参考此处 [Demo](https://codesandbox.io/s/table-row-tooltip-v79j2v) 实现展示 Tooltip 需求或其他自定义的需求。
2 changes: 1 addition & 1 deletion components/tree/style/rtl.less
Expand Up @@ -56,7 +56,7 @@
}
// >>> Checkbox
&-checkbox {
.@{tree-prefix-cls}-rtl& {
.@{tree-prefix-cls}-rtl & {
margin: ((@tree-title-height - @checkbox-size) / 2) 0 0 8px;
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "antd",
"version": "4.20.3",
"version": "4.20.4",
"description": "An enterprise-class UI design language and React components implementation",
"title": "Ant Design",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions site/theme/template/Layout/Header/Navigation.tsx
Expand Up @@ -129,8 +129,8 @@ export default ({
: null,
isZhCN &&
typeof window !== 'undefined' &&
!window.location.host.includes('ant-design.antgroup.com') &&
!window.location.host.includes('ant-design.gitee.io')
window.location.host !== 'ant-design.antgroup.com' &&
window.location.host !== 'ant-design.gitee.io'
? {
label: '国内镜像',
key: 'mirror',
Expand Down
2 changes: 1 addition & 1 deletion site/theme/template/Layout/Header/index.tsx
Expand Up @@ -121,7 +121,7 @@ class Header extends React.Component<HeaderProps, HeaderState> {
});
if (
process.env.NODE_ENV === 'production' &&
!window.location.host.includes('ant-design.antgroup.com') &&
window.location.host !== 'ant-design.antgroup.com' &&
shouldOpenAntdMirrorModal()
) {
Modal.confirm({
Expand Down

0 comments on commit c3a38d0

Please sign in to comment.