Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resize在父组件宽高发生变化的时候不会执行 #542

Open
chj-damon opened this issue Apr 26, 2023 · 2 comments
Open

resize在父组件宽高发生变化的时候不会执行 #542

chj-damon opened this issue Apr 26, 2023 · 2 comments

Comments

@chj-damon
Copy link

我的场景是让Echarts组件随着父容器的宽高变化而变化,所以设置了Echarts的style的宽高都是100%,但是这样一来测试发现即便是父容器的宽高发生了变化,但是Echarts组件并不会重新resize。

<div style={{width, height}}> // 这里的width, height可能会随着浏览器窗口的改变而改变
    <EchartsReact 
        style={{width: '100%', height: '100%'}}
        //...other props
    />
</div>
@Ashish-K1
Copy link

There is a new property autoResize:boolean is added into the ReactEcharts component

@chj-damon
Copy link
Author

autoResize default value is true, but it doesn't work in my Scenario

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants