mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
优化 checkboxes 中options长度不是columnsCount整数倍时最后一列布局不一致问题
This commit is contained in:
parent
86878db288
commit
3d59be2b3b
@ -82,8 +82,8 @@ export default class CheckboxesControl extends React.Component<CheckboxesProps,
|
||||
let cellClassName = `${ns}Grid-col--sm${weight === Math.round(weight) ? weight : ''}`;
|
||||
body = chunk(body, columnsCount).map((group, groupIndex) => (
|
||||
<div className={`${ns}Grid`} key={groupIndex}>
|
||||
{group.map((item, index) => (
|
||||
<div key={index} className={cellClassName}>{item}</div>
|
||||
{Array.from({length: columnsCount as number}).map((_, index) => (
|
||||
<div key={index} className={cellClassName}>{group[index]}</div>
|
||||
))}
|
||||
</div>
|
||||
));
|
||||
|
Loading…
Reference in New Issue
Block a user