Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Popover

Hierarchy

Index

Constructors

constructor

Properties

Readonly contentRef

contentRef: RefObject<IPopoverContentImperativeHandle> = ...

context

getAnchor

getAnchor: () => Element | Text = null

Type declaration

    • (): Element | Text
    • 使用内置的Trigger或者直接用Anchor的情况下由Anchor设置 使用自定义的Trigger也可以直接用Anchor,不用Anchor需要手动设置

      Returns Element | Text

isPositionReady

isPositionReady: boolean = false

Readonly portalRef

portalRef: RefObject<IPortalImperativeHandlers> = ...

Readonly props

props: Readonly<IPopoverProps> & Readonly<{ children?: ReactNode }>

refs

refs: {}

Type declaration

  • [key: string]: ReactInstance

state

state: { visible: boolean } = ...

Type declaration

  • visible: boolean

Static Anchor

Anchor: typeof PopoverAnchor = ...

Static Content

Content: (__namedParameters: IPopoverContentProps) => Element = ...

Type declaration

    • (__namedParameters: IPopoverContentProps): Element
    • Parameters

      • __namedParameters: IPopoverContentProps

      Returns Element

Static Context

Context: Context<IPopoverContext> = ...

Static Position

Position: __module = ...

Static Trigger

Trigger: { Base: typeof PopoverTrigger; Click: <ChildProps>(__namedParameters: IPopoverClickTriggerProps<ChildProps>) => Element; Focus: <ChildProps>(__namedParameters: IPopoverFocusTriggerProps<ChildProps>) => Element; Hover: <ChildProps>(props: IPopoverHoverTriggerProps<ChildProps>) => Element } = ...

Type declaration

Static contextType

contextType: Context<IPopoverContext> = ...

Static defaultProps

defaultProps: { containerSelector: string; cushion: number } = ...

Type declaration

  • containerSelector: string
  • cushion: number

Static withPopover

withPopover: <T>(Comp: ComponentType<T>) => ComponentType<Omit<T, "popover">> = ...

Type declaration

    • <T>(Comp: ComponentType<T>): ComponentType<Omit<T, "popover">>
    • Type parameters

      Parameters

      • Comp: ComponentType<T>

      Returns ComponentType<Omit<T, "popover">>

Methods

Optional UNSAFE_componentWillMount

  • UNSAFE_componentWillMount(): void

Optional UNSAFE_componentWillReceiveProps

  • UNSAFE_componentWillReceiveProps(nextProps: Readonly<IPopoverProps>, nextContext: any): void

Optional UNSAFE_componentWillUpdate

adjustPosition

  • adjustPosition(): void

close

  • close(): void

Optional componentDidCatch

  • componentDidCatch(error: Error, errorInfo: ErrorInfo): void
  • Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

    Parameters

    • error: Error
    • errorInfo: ErrorInfo

    Returns void

componentDidMount

  • componentDidMount(): void

componentDidUpdate

Optional componentWillMount

  • componentWillMount(): void

Optional componentWillReceiveProps

  • componentWillReceiveProps(nextProps: Readonly<IPopoverProps>, nextContext: any): void

componentWillUnmount

  • componentWillUnmount(): void

Optional componentWillUpdate

forceUpdate

  • forceUpdate(callback?: () => void): void
  • Parameters

    • Optional callback: () => void
        • (): void
        • Returns void

    Returns void

Optional getSnapshotBeforeUpdate

  • Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

    Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated lifecycle events from running.

    Parameters

    Returns any

open

  • open(): void

render

  • render(): Element

safeSetState

  • safeSetState(nextState: IPopoverState, callback?: () => void): void

setState

setVisible

  • setVisible(visible: boolean): void | Promise<void>

Optional shouldComponentUpdate

  • Called to determine whether the change in props and state should trigger a re-render.

    Component always returns true. PureComponent implements a shallow comparison on props and state and returns true if any props or states have changed.

    If false is returned, Component#render, componentWillUpdate and componentDidUpdate will not be called.

    Parameters

    Returns boolean

Static getDerivedStateFromProps

Generated using TypeDoc