JorrinKievit / react-ts-tradingview-widgets

This is a React component library for TradingView Widgets
https://tradingview-widgets.jorrinkievit.xyz/
MIT License
154 stars 48 forks source link

Autosizing extra div #55

Closed jrocketfingers closed 8 months ago

jrocketfingers commented 8 months ago

Autosizing a component cannot fit the height properly due to one extra div being added somewhere within the widget itself.

Image demonstrating the problem

![image](https://github.com/JorrinKievit/react-ts-tradingview-widgets/assets/2845244/6fc148a0-8812-412b-a070-d554fc524830)

Relevant snippet of JSX

```jsx

{/* utility */}
{/* utility */}
```

Affected widgets (that I've tested so far):

Version of react-ts-tradingview-widgets: v1.2.2

JorrinKievit commented 8 months ago

Hmm weird. This wasn't happening before so it must be in the scripts of tradingview we are appending. Will take a take a look when I get the chance. Always open for PR's!

JorrinKievit commented 8 months ago

Scratch that. You can add a containerId to the component, and use that id to style that div for now until a better solution is found.

Edit: the containerId is currently only in SymbolOverview and AdvancedRealTimeChart 🤦 , so should be added to all of them.

JorrinKievit commented 8 months ago

Managed to quickly figure it out, should be fixed in 1.2.3

jrocketfingers commented 8 months ago

Thanks for a quick solution, happy to hear that! Will be reverting back to your components as soon as it's released.

Thanks for the library as well, it really makes working with tradingview widgets bearable 🙇