mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
fix(space.compact): Node content change causing animation displacement
This commit is contained in:
parent
0b6356d984
commit
2d3df91e73
@ -95,7 +95,9 @@ const Compact: React.FC<SpaceCompactProps> = (props) => {
|
|||||||
|
|
||||||
const compactItemContext = React.useContext(SpaceCompactItemContext);
|
const compactItemContext = React.useContext(SpaceCompactItemContext);
|
||||||
|
|
||||||
const childNodes = toArray(children);
|
const childNodes = toArray(children, {
|
||||||
|
keepEmpty: true,
|
||||||
|
});
|
||||||
const nodes = React.useMemo(
|
const nodes = React.useMemo(
|
||||||
() =>
|
() =>
|
||||||
childNodes.map((child, i) => {
|
childNodes.map((child, i) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user