Renders a row table cell showing the title of a particular entity. This cell takes the entity object as its children, which is in turn compatible with the NerdGraph entity object (needing, at the very least, the name
and reporting
fields). If alertable, you should also query for alertSeverity
.
Usage
import { EntityTitleTableRowCell } from 'nr1'
Examples
Basic
function render() { const items = [ { name: 'Login service', guid: 'MTIzNDU2fEZPT3xCQVJ8OTg3NjU0MzIx', alertSeverity: 'CRITICAL', reporting: true, }, ];
return ( <Table items={items}> <TableHeader> <TableHeaderCell>Entity</TableHeaderCell> </TableHeader>
{({ item }) => ( <TableRow> <EntityTitleTableRowCell value={item} /> </TableRow> )} </Table> );}
With additional value
function render() { const items = [ { name: 'Login service', guid: 'MTIzNDU2fEZPT3xCQVJ8OTg3NjU0MzIx', alertSeverity: 'CRITICAL', reporting: true, }, ];
return ( <Table items={items} multivalue> <TableHeader> <TableHeaderCell>Entity</TableHeaderCell> </TableHeader>
{({ item }) => ( <TableRow> <EntityTitleTableRowCell value={item} additionalValue={item.guid} /> </TableRow> )} </Table> );}
Props
string | Additional information along the main data in the cell.Note: At the moment this content becomes visible only when the |
string | Appends class names to the component.Should be used only for positioning and spacing purposes. |
function | Callback fired any time the user clicks on the cell. function ( |
object | Inline style for custom styling.Should be used only for positioning and spacing purposes. |
string | Adds a Note: You might not see |
shape|string | Location object or url string to link to.Linked shape
REQUIREDstring
string
string |
REQUIREDshape | Entity object, that requires (at least), the shape
REQUIREDstring
string
REQUIREDboolean |