Skip to content

Tooltip go off screen #48

@ilariowiz

Description

@ilariowiz
showTooltip(target, parent, text) {
    RNTooltips.Show(
	target,
	parent,
	{
		text: text,
		tintColor: '#ffffff',
		textColor: '#4a4a4a',
		textSize: 16,
		duration: 1000,
		corner: 8,
		clickToHide: true,
		autoHide: true,
		duration: 3
	}
    )
}
<View ref={ref => this.parent = ref}>
    <View>
        <ScrollView>
            <View>
                <TouchableOpacity ref={ref => this.target = ref} onPress={() => this.showTooltip(this.target, this.parent, 'hello')}>
                </TouchableOpacity>
            </View>
        </ScrollView>
    <View> 
</View>

I'm testing with iOS 14.1, I noticed that with some dimensions there are no problems, for example setting width: 200 on the parent, but on the same component putting width: 300 or width: '100%' the tooltip goes off screen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions