Skip to content

Commit

Permalink
🐛 Allow none search value for issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ibolton336 committed Dec 4, 2023
1 parent d2ea8c1 commit fde79f9
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions client/src/app/pages/issues/issues-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,18 @@ export const IssuesTable: React.FC<IIssuesTableProps> = ({ mode }) => {
what: t("terms.source").toLowerCase(),
}) + "...",
serverFilterField: "labels",
getServerFilterValue: (value) =>
value?.length === 1 ? [`konveyor.io/source=*${value}*`] : undefined,
getServerFilterValue: (value) => {
if (
(value && value[0] === "None") ||
(value && value[0] === "none")
) {
return [`konveyor.io/source`];
} else if (value && value.length > 0) {
return [`konveyor.io/source=*${value}*`];
} else {
return undefined;
}
},
},
{
key: "target",
Expand Down Expand Up @@ -345,6 +355,8 @@ export const IssuesTable: React.FC<IIssuesTableProps> = ({ mode }) => {
>
{currentPageReports?.map((report, rowIndex) => {
const { sources, targets, otherLabels } = parseReportLabels(report);
console.log("report", report);
console.log("sources", sources);
return (
<Tbody
key={report._ui_unique_id}
Expand Down

0 comments on commit fde79f9

Please sign in to comment.