Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix(QueryGroup): Correct handling of the `QueryGroup` click event

haitaoobf06c1308c2e
diff --git a/ui/src/components/QueryGroup/index.tsx b/ui/src/components/QueryGroup/index.tsx
index 7a6b0879..a8c7215c 100644
--- a/ui/src/components/QueryGroup/index.tsx
+++ b/ui/src/components/QueryGroup/index.tsx
@@ -42,13 +42,13 @@ const Index: FC<Props> = ({
const handleClick = (e, type) => {
const str = handleParams(type);
- if (pathname) {
- if (floppyNavigation.shouldProcessLinkClick(e)) {
- e.preventDefault();
+ if (floppyNavigation.shouldProcessLinkClick(e)) {
+ e.preventDefault();
+ if (pathname) {
navigate(`${pathname}${str}`);
+ } else {
+ setUrlSearchParams(str);
}
- } else {
- setUrlSearchParams(str);
}
};