From 061d4c8ea0dc082d7dce467bcea3af36c5d5dd94 Mon Sep 17 00:00:00 2001 From: HyaCinth <88471803+HyaCiovo@users.noreply.github.com> Date: Thu, 24 Jul 2025 15:14:30 +0800 Subject: [PATCH] fix(plugins_select): Adjust z-index, fix issue where options cannot be displayed (#22873) (#22893) --- .../[appId]/overview/tracing/config-popup.tsx | 2 +- web/app/components/app-sidebar/app-operations.tsx | 6 +++--- web/app/components/base/select/pure.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx index 2afe451fe..907c27001 100644 --- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx @@ -1,5 +1,5 @@ 'use client' -import type { FC } from 'react' +import type { FC, JSX } from 'react' import React, { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' import { useBoolean } from 'ahooks' diff --git a/web/app/components/app-sidebar/app-operations.tsx b/web/app/components/app-sidebar/app-operations.tsx index 49cad7157..79c460419 100644 --- a/web/app/components/app-sidebar/app-operations.tsx +++ b/web/app/components/app-sidebar/app-operations.tsx @@ -1,4 +1,4 @@ -import type { ReactElement } from 'react' +import type { JSX } from 'react' import { cloneElement, useCallback } from 'react' import { useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -7,7 +7,7 @@ import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigge import { RiMoreLine } from '@remixicon/react' export type Operation = { - id: string; title: string; icon: ReactElement; onClick: () => void + id: string; title: string; icon: JSX.Element; onClick: () => void } const AppOperations = ({ operations, gap }: { @@ -47,7 +47,7 @@ const AppOperations = ({ operations, gap }: { updatedEntries[id] = true width += gap + childWidth } - else { + else { if (i === childrens.length - 1 && width + childWidth <= containerWidth) updatedEntries[id] = true else diff --git a/web/app/components/base/select/pure.tsx b/web/app/components/base/select/pure.tsx index be88c936f..046f32676 100644 --- a/web/app/components/base/select/pure.tsx +++ b/web/app/components/base/select/pure.tsx @@ -91,7 +91,7 @@ const PureSelect = ({ triggerPopupSameWidth={triggerPopupSameWidth} > handleOpenChange(!mergedOpen)} + onClick={() => !disabled && handleOpenChange(!mergedOpen)} asChild >