ReactUtils.getChildId() function

ReactUtils.getChildId() function

Returns the ID value of the first, and only, child element

Signature

  1. export declare function getChildId(children: ReactElement): string | undefined;

Import

  1. import { ReactUtils } from '@grafana/ui';
  2. const { getChildId } = ReactUtils;

Parameters

ParameterTypeDescription
childrenReactElement

Returns:

string | undefined