1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Using simple notation to set search url params

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-12-23 12:01:35 +03:00
parent 5ad569519a
commit 9f6067c2d5

View File

@ -24,7 +24,6 @@ import React from "react";
import { KubeObject } from "../../../common/k8s-api/kube-object";
import type { CatalogEntity } from "../../api/catalog-entity";
import { Badge } from "../badge";
import { navigation } from "../../navigation";
import { searchUrlParam } from "../input";
/**
@ -40,7 +39,7 @@ export function getLabelBadges(entity: CatalogEntity, onClick?: (evt: React.Mous
label={label}
title={label}
onClick={(event) => {
navigation.searchParams.set(searchUrlParam.name, label);
searchUrlParam.set(label);
onClick?.(event);
event.stopPropagation();
}}