fix(space.compact): Node content change causing animation displacement

This commit is contained in:
zhangcong 2024-01-03 16:12:06 +08:00
parent 0b6356d984
commit 2d3df91e73

View File

@ -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) => {