Skip to content

Commit

Permalink
🐛 Use exact match for filtering by application name (#1966)
Browse files Browse the repository at this point in the history
Exact match ensures that active item is on page.

Example usage:
/applications?activeItem=6&filters={"name":["bookserver-app"]}

Resolves: #1974

Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
  • Loading branch information
rszwajko committed Jun 26, 2024
1 parent 7c84e60 commit cbef5e9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export const ApplicationsTable: React.FC = () => {
t("actions.filterBy", {
what: t("terms.name").toLowerCase(),
}) + "...",
getItemValue: (item) => item?.name || "",
matcher: (filter: string, item: Application) => item.name === filter,
selectOptions: [
...new Set(
applications.map((application) => application.name).filter(Boolean)
Expand Down

0 comments on commit cbef5e9

Please sign in to comment.