React-material-ui-carousel 未在 init 上渲染全高内容

问题描述 投票:0回答:1

我正在使用 React-material-ui-carousel v3 和 MUI v5。我需要在轮播中呈现自定义 HTML 内容。我遇到的问题是,在第一次渲染时,第一个项目没有完整的高度,请参见下面的图片

    return (
        <Carousel autoPlay={true}>
            {items.map((item, i) => {
                const htmlContent = getHtmlContent(decodeHtml(item));
                return <div key={i}>{htmlContent}</div>;
            })}
        </Carousel>
    );

First init After moving to the second page and then to the first page

如何调整高度以显示内容的完整高度?

reactjs material-ui carousel react-material-ui-carousel
1个回答
0
投票

同样的问题。你找到解决办法了吗?

© www.soinside.com 2019 - 2024. All rights reserved.