Group 的宽度计算优化

This commit is contained in:
2betop 2020-01-15 16:25:48 +08:00
parent 68d9d6af18
commit 1d3e3817b4

View File

@ -96,6 +96,14 @@ export class ControlGroupRenderer extends React.Component<InputGroupProps> {
formMode = mode || formMode;
let horizontalDeeper =
horizontal ||
makeHorizontalDeeper(
formHorizontal,
controls.filter(item => item.mode !== 'inline' && isVisible(item, data))
.length
);
return (
<div
className={cx(
@ -124,12 +132,6 @@ export class ControlGroupRenderer extends React.Component<InputGroupProps> {
const columnWidth =
control.columnRatio ||
getWidthRate(control && control.columnClassName);
let horizontalDeeper =
horizontal ||
makeHorizontalDeeper(
formHorizontal,
controls.filter(item => item.mode !== 'inline').length
);
return (
<div