Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Allow none search value for issues #1585

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 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")
) {
Comment on lines +142 to +145
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using if (value && value[0]?.toLowercase() === "none") { would be a bit safer

return [`konveyor.io/source`];
} else if (value && value.length > 0) {
return [`konveyor.io/source=*${value}*`];
} else {
return undefined;
}
},
},
{
key: "target",
Expand Down
Loading