diff --git a/src/components/SimpleTable.js b/src/components/SimpleTable.js index 1416dc5b5..5b30df796 100644 --- a/src/components/SimpleTable.js +++ b/src/components/SimpleTable.js @@ -1,3 +1,4 @@ +import React from 'react'; import { isNil } from 'lodash/fp'; import { div, h } from 'react-hyperscript-helpers'; import { Styles } from '../libs/theme'; @@ -8,27 +9,23 @@ import loadingImage from '../images/loading-indicator.svg'; // Renders spinning circle while table loading const TableLoading = () => { - return div({className: 'table-loading-placeholder'}, - [ - h(SpinnerComponent, { - show: true, - name: 'loadingSpinner', - loadingImage - }, []) - ] + return ( +
+ +
); }; -//Simple cell text display +// Simple cell text display const SimpleTextCell = ({ text, style, keyProp }) => { - text = isNil(text) ? '- -' : text; - return div({ style, role: 'cell', key: keyProp }, [text]); + text = text ?? '- -'; + return
{text}
; }; -//Simple cell text that carries onClick functionality +// Simple cell text that carries onClick functionality const OnClickTextCell = ({ text, style, onClick, keyProp }) => { - text = isNil(text) ? '- -' : text; - return div({ style, onClick, role: 'cell', key: keyProp }, [text]); + text = text ?? '- -'; + return
{text}
; }; //Column component that renders the column row based on column headers