Closed hildebrandjp closed 1 year ago
Please review this section of the documentation, make sure you have a good understanding of how React Native renders views when using Tooltip mode.
It's not very clear what your issue is. The image you attached is cropped and it's hard to see what it is showing, and the code you included is unformatted so I can't read it well. If you improve the code formatting and are more specific about what your issue is, I may be able to help.
I already solve the issue using onCloseComplete callback set custom minHeight
to popoverStyle prop and it works. Thank you
Describe the bug I'm trying to implement a tooltip that can be clickable outside anytime. I want to set the tooltip mode and placement bottom. But the tooltip render is truncated. I think it depends on parent element. I tried to use popoverStyle to change the minHeight and height but still not working.
Device/Setup Info:
react-native
version: 0.69.6react-native-popover-view
version: ^5.1.7Screenshots
Debug Output
Code
passwordChange.js
const [isShowPopover, setIsShowPopover] = useState(true); const [idpopOver, setIdpopOver] = useState(1);
const onUpdatePassword = (values) => { console.log({values}); }
const iconAlertElement = (errorText, errors, id) => ( <> <RNPopover mode='tooltip' isVisible={isShowPopover && errors && (id === idpopOver)} onRequestClose={() => setIsShowPopover(false)} verticalOffset={null} offset={0} from = {(
return (
) }
RNPopover.js
export default function RNPopover({ children, from=null, onRequestClose=null, isVisible=false, placement="bottom", arrowSize={width: 14, height: 6}, mode=PopoverMode.RN_MODAL, offset=-10, popoverStyle=null, verticalOffset=Platform.OS === 'android' ? -StatusBar.currentHeight : 0 }) { return ( <> <Popover debug={true} backgroundStyle={{backgroundColor: 'transparent', opacity: 0}} arrowSize={arrowSize} popoverStyle={{backgroundColor: 'red', borderTopColor: 'red', borderTopWidth: 3, borderRadius: 0, padding: 0, margin: 0, ...popoverStyle}} animationConfig={{duration:0}} mode={mode} placement={placement} offset={offset} verticalOffset={verticalOffset} isVisible={isVisible} onRequestClose={() => onRequestClose()} from = {from}> {children} </Popover> </> ) }