fix: toolbar 设置 align 为 left 不生效问题 (#1999)

This commit is contained in:
吴多益 2021-05-21 19:58:29 +08:00 committed by GitHub
parent ae44d399e5
commit 4f9039c7ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1826,7 +1826,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
{children.map(({toolbar, dom: child}, index) => {
const type = (toolbar as Schema).type || toolbar;
let align =
toolbar.align || type === 'pagination' ? 'right' : 'left';
toolbar.align || (type === 'pagination' ? 'right' : 'left');
return (
<div
key={index}