mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
🗑️ remove Tag afterClose from docs (#24779)
This commit is contained in:
parent
e09ce6284e
commit
584f9fd907
@ -100,19 +100,6 @@ describe('Tag', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('props#afterClose do not warn anymore', () => {
|
|
||||||
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
|
||||||
|
|
||||||
const afterClose = jest.fn();
|
|
||||||
const wrapper = mount(<Tag closable afterClose={afterClose} />);
|
|
||||||
|
|
||||||
expect(errorSpy.mock.calls.length).toBe(1);
|
|
||||||
expect(errorSpy.mock.calls[0][0].includes('React does not recognize')).toBeTruthy();
|
|
||||||
|
|
||||||
wrapper.find('.anticon-close').simulate('click');
|
|
||||||
expect(afterClose).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('CheckableTag', () => {
|
describe('CheckableTag', () => {
|
||||||
it('support onChange', () => {
|
it('support onChange', () => {
|
||||||
const onChange = jest.fn();
|
const onChange = jest.fn();
|
||||||
|
@ -19,7 +19,6 @@ Tag for categorizing or markup.
|
|||||||
|
|
||||||
| Property | Description | Type | Default |
|
| Property | Description | Type | Default |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| afterClose | Callback executed when close animation is completed, please use `onClose`, we will remove this in the next version | () => void | - |
|
|
||||||
| closable | Whether the Tag can be closed | boolean | `false` |
|
| closable | Whether the Tag can be closed | boolean | `false` |
|
||||||
| color | Color of the Tag | string | - |
|
| color | Color of the Tag | string | - |
|
||||||
| onClose | Callback executed when tag is closed | (e) => void | - |
|
| onClose | Callback executed when tag is closed | (e) => void | - |
|
||||||
|
@ -19,7 +19,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/cH1BOLfxC/Tag.svg
|
|||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 |
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| afterClose | 关闭动画完成后的回调,请使用 `onClose`, 我们将在下个版本删除此项 | () => void | - |
|
|
||||||
| closable | 标签是否可以关闭 | boolean | false |
|
| closable | 标签是否可以关闭 | boolean | false |
|
||||||
| color | 标签色 | string | - |
|
| color | 标签色 | string | - |
|
||||||
| onClose | 关闭时的回调 | (e) => void | - |
|
| onClose | 关闭时的回调 | (e) => void | - |
|
||||||
|
Loading…
Reference in New Issue
Block a user