• /
  • Log in
  • Start now

PopoverTrigger

Child element of the <Popover> component.

Controls the opening/closing of the Popover overlay.

Usage

import { PopoverTrigger } from 'nr1'

Props

childrenrequirednode|function

This component can render in two ways, by directly passing a children React element, or by passing a render callback (function as children).

When passing a React element directly, you can either use some of the compatible NR1 SDK Components like <TextField>, <Button>... or use your own Component.

When using a render callback, you will receive an object of the following shape as an argument { opened: boolean }.

No matter if you're passing components directly or using a render callback, when rendering your own component as trigger, it should always expose a focus method in order to work properly.

function () => undefined

Methods

PopoverTrigger.render

function () => undefined
Edit this pageCreate an issue
Copyright © 2021 New Relic Inc.

This site uses cookies 🍪

We use cookies and other similar technologies ("Cookies") on our websites and services to enhance your experience and to provide you with relevant content. By using our websites and services you are agreeing to the use of cookies. You can read more here. If you consent to our cookies, please click Yes.