Renders a row table cell showing the favorite status of a particular entity. The favorite status can be controlled through the checked
property and the status changes can be listened through the onChange
property.
Usage
import { FavoriteTableRowCell } from 'nr1'
Examples
Example 1
function render() { const items = [ { name: 'Login service', alertSeverity: 'CRITICAL', reporting: true, favorite: true, }, { name: 'Service Gateway', alertSeverity: 'NOT_ALERTING', reporting: true, favorite: false, }, ]; return ( <Table items={items}> <TableHeader> <TableHeaderCell width="56px" /> <TableHeaderCell>Entity</TableHeaderCell> </TableHeader> {({ item }) => ( <TableRow> <FavoriteTableRowCell checked={item.favorite} /> <EntityTitleTableRowCell value={item} /> </TableRow> )} </Table> );}
Props
boolean | If |
string | Inline style for custom styling.Should be used only for positioning and spacing purposes. |
function | Callback fired any time the favorite status changes. The new favorite status will be passed as second parameter. 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 shapepathname REQUIREDstring
string
string |