UNPKG

@bigfishtv/cockpit

Version:

16 lines (14 loc) 447 B
import React, { Component } from 'react' import { Cell } from 'fixed-data-table' import _get from 'lodash/get' import stripTags from 'striptags' /** * Table cell for displaying html content */ export default class FixedDataTableHtmlCell extends Component { render() { const { data, rowIndex, columnKey, ...props } = this.props const value = _get(data[rowIndex], columnKey) return <Cell {...props}>{value && stripTags(value)}</Cell> } }