Skip to content

Commit

Permalink
Removed Old Methods from table_list_view
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidResende0 committed Jan 16, 2024
1 parent 529715c commit ee15f36
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions app/javascript/components/textual_summary/table_list_view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,6 @@ import * as React from 'react';
import PropTypes from 'prop-types';
import MiqStructuredList from '../miq-structured-list';

const simpleRow = (row, i, colOrder) => (
<tr key={i} className="no-hover">
{colOrder.map((col, j) => <td key={j}>{row[col]}</td>)}
</tr>
);

const clickableRow = (row, i, colOrder, rowLabel, onClick) => (
<tr key={i}>
{colOrder.map((col, j) => (
<td key={j} title={rowLabel}>
<a href={row.link} onClick={(e) => onClick(row, e)}>
{`${row[col]}`}
</a>
</td>
))}
</tr>
);

const renderRow = (row, i, colOrder, rowLabel, onClick) => (
row.link ? clickableRow(row, i, colOrder, rowLabel, onClick) : simpleRow(row, i, colOrder)
);

export default function TableListView(props) {
const { headers, values, title } = props;

Expand Down

0 comments on commit ee15f36

Please sign in to comment.