Skip to content

Commit

Permalink
Merge pull request #9040 from DavidResende0/table-list-view-code-cleanup
Browse files Browse the repository at this point in the history
Removed Old Methods from table_list_view
  • Loading branch information
jeffibm authored Jan 17, 2024
2 parents f2bd52b + ee15f36 commit 782516c
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 782516c

Please sign in to comment.