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:
parent
5ad569519a
commit
9f6067c2d5
@ -24,7 +24,6 @@ import React from "react";
|
|||||||
import { KubeObject } from "../../../common/k8s-api/kube-object";
|
import { KubeObject } from "../../../common/k8s-api/kube-object";
|
||||||
import type { CatalogEntity } from "../../api/catalog-entity";
|
import type { CatalogEntity } from "../../api/catalog-entity";
|
||||||
import { Badge } from "../badge";
|
import { Badge } from "../badge";
|
||||||
import { navigation } from "../../navigation";
|
|
||||||
import { searchUrlParam } from "../input";
|
import { searchUrlParam } from "../input";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,7 +39,7 @@ export function getLabelBadges(entity: CatalogEntity, onClick?: (evt: React.Mous
|
|||||||
label={label}
|
label={label}
|
||||||
title={label}
|
title={label}
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
navigation.searchParams.set(searchUrlParam.name, label);
|
searchUrlParam.set(label);
|
||||||
onClick?.(event);
|
onClick?.(event);
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}}
|
}}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user