Skip to content

Commit

Permalink
add a column for version
Browse files Browse the repository at this point in the history
  • Loading branch information
corviday committed Nov 21, 2024
1 parent 64bbcde commit 78e0b87
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/components/data-grid/two-level/LocationTable/LocationTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ export default function LocationTable({ locations }) {
uniq,
)(files),

versions: flow(
map('version'),
compact,
uniq,
)(files),

filesData: map(
file => {
const {
Expand Down Expand Up @@ -247,6 +253,31 @@ export default function LocationTable({ locations }) {
filter: includesInArrayOfType(Number, "*"),
disableSortBy: true,
},
{
Header: "Versions",
accessor: "versions",
Cell: ({ value }) => {
return (
<span style={{ whiteSpace: 'nowrap' }}>
{
flow(
map(t => `${t}`),
join(', '),
)(value)
}
</span>
);
},
Filter: ({ column }) => (
<SelectArrayColumnFilter
toString={option => `${option}`}
column={column}
allValue={"*"}
/>
),
filter: includesInArrayOfType(String, "*"),
disableSortBy: true,
},
{
Header: "Scenarios",
accessor: "scenarios",
Expand Down

0 comments on commit 78e0b87

Please sign in to comment.