mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
chore: add warning for breaking changes
This commit is contained in:
parent
37e8474714
commit
c754a3d3d4
@ -56,7 +56,7 @@ export default class Breadcrumb extends React.Component<BreadcrumbProps, any> {
|
||||
|
||||
warning(
|
||||
!('linkRender' in props || 'nameRender' in props),
|
||||
'`linkRender` and `nameRender` is removed, please use `itemRender` instead.'
|
||||
'`linkRender` and `nameRender` are removed, please use `itemRender` instead.'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import RcMenu, { Item, Divider, SubMenu, ItemGroup } from 'rc-menu';
|
||||
import animation from '../_util/openAnimation';
|
||||
import warning from 'warning';
|
||||
|
||||
function noop() {
|
||||
}
|
||||
@ -68,6 +69,12 @@ export default class Menu extends React.Component<MenuProps, any> {
|
||||
switchModeFromInline: boolean;
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
warning(
|
||||
!('onOpen' in props || 'onClose' in props),
|
||||
'`onOpen` and `onClose` are removed, please use `onOpenChange` instead.'
|
||||
);
|
||||
|
||||
this.state = {
|
||||
openKeys: [],
|
||||
};
|
||||
|
@ -10,6 +10,7 @@ import classNames from 'classnames';
|
||||
import { flatArray, treeMap } from './util';
|
||||
import assign from 'object-assign';
|
||||
import splitObject from '../_util/splitObject';
|
||||
import warning from 'warning';
|
||||
|
||||
function noop() {
|
||||
}
|
||||
@ -134,6 +135,13 @@ export default class Table extends React.Component<TableProps, any> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
warning(
|
||||
!('columnsPageRange' in props || 'columnsPageSize' in props),
|
||||
'`columnsPageRange` and `columnsPageSize` are removed, please use ' +
|
||||
'[fixed columns](http://ant.design/components/table/#components-table-demo-fixed-columns) ' +
|
||||
'instead.'
|
||||
);
|
||||
|
||||
const pagination = props.pagination || {};
|
||||
|
||||
this.state = assign({}, this.getSortStateFromColumns(), {
|
||||
|
Loading…
Reference in New Issue
Block a user