修复 onAction 报错问题
This commit is contained in:
parent
842ecd8387
commit
89bcede633
|
@ -117,8 +117,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||||
'loadDataOnce',
|
'loadDataOnce',
|
||||||
'loadDataOnceFetchOnFilter',
|
'loadDataOnceFetchOnFilter',
|
||||||
'source',
|
'source',
|
||||||
'header',
|
'header'
|
||||||
'onAction'
|
|
||||||
];
|
];
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
toolbarInline: true,
|
toolbarInline: true,
|
||||||
|
|
|
@ -78,10 +78,7 @@ export default class Page extends React.Component<PageProps> {
|
||||||
'body',
|
'body',
|
||||||
'aside',
|
'aside',
|
||||||
'messages',
|
'messages',
|
||||||
'style',
|
'style'
|
||||||
'onAction',
|
|
||||||
'onConfirm',
|
|
||||||
'onClose'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
|
|
|
@ -122,9 +122,7 @@ export default class Table extends React.Component<TableProps, object> {
|
||||||
'combineNum',
|
'combineNum',
|
||||||
'items',
|
'items',
|
||||||
'valueField',
|
'valueField',
|
||||||
'saveImmediately',
|
'saveImmediately'
|
||||||
'onAction',
|
|
||||||
'onQuickChange'
|
|
||||||
];
|
];
|
||||||
static defaultProps: Partial<TableProps> = {
|
static defaultProps: Partial<TableProps> = {
|
||||||
className: '',
|
className: '',
|
||||||
|
|
|
@ -1098,7 +1098,8 @@ export function chainEvents(props: any, schema: any) {
|
||||||
if (
|
if (
|
||||||
key.substr(0, 2) === 'on' &&
|
key.substr(0, 2) === 'on' &&
|
||||||
typeof props[key] === 'function' &&
|
typeof props[key] === 'function' &&
|
||||||
typeof schema[key] === 'function'
|
typeof schema[key] === 'function' &&
|
||||||
|
schema[key] !== props[key]
|
||||||
) {
|
) {
|
||||||
ret[key] = chainFunctions(schema[key], props[key]);
|
ret[key] = chainFunctions(schema[key], props[key]);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue