Reputation: 81
I am having an issue in implementing the dynamic tooltip in react-native.
I want to implement tooltip in which i have to show dynamic data which is coming from the Backend. I have tried to implement react-native-elements ToolTip, react-native-walkthrough-tooltip library. but with their props i am not able to achieve the same..
I have tried setting the Tooltip container view with the help of flex and giving height width to the inside container view.
Can anyone help me how to achieve the consitent height and width with the dynamic data. should i give the height and width styling in the tooltip props or should i use containerStyle prop or should i give the height width only to the inner views??
I have tried all the three above things, still no luck...!!
Upvotes: 2
Views: 2215
Reputation: 905
It looks like React Native Elements ToolTip doesn't support dynamic height and width. The component's designed for you to specify the size manually. You might be able to get around the Height/Width props by doing something like height={null} width={null}
.
If that doesn't work and this is something that's going to show up a lot in your application, then I'd recommend building your own ToolTip component. That way instead of specifying height and width you can just add padding and have it change sizes based on the content.
Upvotes: 1