question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tooltip: popover move elements when appears

See original GitHub issue

version: “^1.2.7”, Device: Android

I want to create a Header component with an icon that shows the popover

Expected behavior

The Tooltip component shows popover without moving its children element

Describe the bug

It could be reproduced using Avatar, Icon and Text element

Screenshots

Avatar

Peek 2020-03-19 01-27

import React from 'react';
import { Text } from 'react-native';

// theme
import { Header, Icon, Tooltip, Avatar } from 'components';

const App: () => React$Node = () => {
  return (
    <Header
      rightComponent={() => (
        <Tooltip popover={<Text>Info here</Text>} overlayColor="transparent">
          <Avatar rounded icon={{ name: 'person' }} />
        </Tooltip>
      )}
    />
  );
};

export default App;

Icon

Peek 2020-03-19 01-27-2

import React from 'react';
import { Text } from 'react-native';

// theme
import { Header, Icon, Tooltip, Avatar } from 'components';

const App: () => React$Node = () => {
  return (
    <Header
      rightComponent={() => (
        <Tooltip popover={<Text>Info here</Text>} overlayColor="transparent">
          <Icon name="person" />
        </Tooltip>
      )}
    />
  );
};

export default App;

Text

Peek 2020-03-19 02-08-4

const App: () => React$Node = () => {
  return (
    <Header
      rightComponent={() => (
        <Tooltip popover={<Text>Info here</Text>} overlayColor="transparent">
          <Text>Info here</Text>
        </Tooltip>
      )}
    />
  );
};

Your Environment (please complete the following information):

software version
react-native-elements ^1.2.7
react-native 0.61.5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Changing the position of Bootstrap popovers based on the ...
I haven't looked at the Bootstrap source, yet, but it looks like it only takes the element positioning into account, and not the...
Read more >
Popovers · Bootstrap v5.0
Hides an element's popover. Returns to the caller before the popover has actually been hidden (i.e. before the hidden.bs.popover event occurs). This is ......
Read more >
How to Position a React-Bootstrap Popover - Pluralsight
A tooltip is generally triggered when you hover over an element, whereas a popover is triggered on a click.
Read more >
How to position a Bootstrap popover ? - GeeksforGeeks
However, a popover can contain much more content than a tooltip. ... as Popover by default will appear on the right side of...
Read more >
Change Bootstrap Popover Position - Coding Explained -
Here we configure that the popover should be positioned below the element that triggers/opens it, and that we will specify custom HTML ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found