Skip to content

Commit

Permalink
🐛 Column name change to tagCategory (#1881) (#1882)
Browse files Browse the repository at this point in the history
Resolves https://issues.redhat.com/browse/MTA-2681

Signed-off-by: Ian Bolton <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>

Signed-off-by: Ian Bolton <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>
Co-authored-by: Ian Bolton <[email protected]>
  • Loading branch information
konveyor-ci-bot[bot] and ibolton336 authored Apr 24, 2024
1 parent 9914066 commit fa2dc81
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions client/src/app/pages/controls/tags/tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export const Tags: React.FC = () => {
idProperty: "name",
items: tagCategories,
columnNames: {
name: t("terms.name"),
tagCategory: t("terms.tagCategory"),
rank: t("terms.rank"),
color: t("terms.color"),
tagCount: t("terms.tagCount"),
Expand Down Expand Up @@ -236,10 +236,10 @@ export const Tags: React.FC = () => {
},
],
initialItemsPerPage: 10,
sortableColumns: ["name", "rank", "tagCount"],
initialSort: { columnKey: "name", direction: "asc" },
sortableColumns: ["tagCategory", "rank", "tagCount"],
initialSort: { columnKey: "tagCategory", direction: "asc" },
getSortValues: (item) => ({
name: item?.name || "",
tagCategory: item?.name || "",
rank: typeof item?.rank === "number" ? item.rank : Number.MAX_VALUE,
tagCount: item?.tags?.length || 0,
}),
Expand Down Expand Up @@ -318,7 +318,10 @@ export const Tags: React.FC = () => {
<Thead>
<Tr>
<TableHeaderContentWithControls {...tableControls}>
<Th {...getThProps({ columnKey: "name" })} width={30} />
<Th
{...getThProps({ columnKey: "tagCategory" })}
width={30}
/>
<Th {...getThProps({ columnKey: "rank" })} width={20} />
<Th {...getThProps({ columnKey: "color" })} width={20} />
<Th {...getThProps({ columnKey: "tagCount" })} width={20} />
Expand Down Expand Up @@ -365,7 +368,10 @@ export const Tags: React.FC = () => {
item={tagCategory}
rowIndex={rowIndex}
>
<Td width={25} {...getTdProps({ columnKey: "name" })}>
<Td
width={25}
{...getTdProps({ columnKey: "tagCategory" })}
>
{tagCategory.name}
</Td>
<Td width={10} {...getTdProps({ columnKey: "rank" })}>
Expand Down

0 comments on commit fa2dc81

Please sign in to comment.