This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
'use client'
|
'use client'
|
||||||
import type { FC } from 'react'
|
import type { FC, JSX } from 'react'
|
||||||
import React, { useCallback, useState } from 'react'
|
import React, { useCallback, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useBoolean } from 'ahooks'
|
import { useBoolean } from 'ahooks'
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import type { ReactElement } from 'react'
|
import type { JSX } from 'react'
|
||||||
import { cloneElement, useCallback } from 'react'
|
import { cloneElement, useCallback } from 'react'
|
||||||
import { useEffect, useRef, useState } from 'react'
|
import { useEffect, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
@@ -7,7 +7,7 @@ import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigge
|
|||||||
import { RiMoreLine } from '@remixicon/react'
|
import { RiMoreLine } from '@remixicon/react'
|
||||||
|
|
||||||
export type Operation = {
|
export type Operation = {
|
||||||
id: string; title: string; icon: ReactElement; onClick: () => void
|
id: string; title: string; icon: JSX.Element; onClick: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const AppOperations = ({ operations, gap }: {
|
const AppOperations = ({ operations, gap }: {
|
||||||
@@ -47,7 +47,7 @@ const AppOperations = ({ operations, gap }: {
|
|||||||
updatedEntries[id] = true
|
updatedEntries[id] = true
|
||||||
width += gap + childWidth
|
width += gap + childWidth
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (i === childrens.length - 1 && width + childWidth <= containerWidth)
|
if (i === childrens.length - 1 && width + childWidth <= containerWidth)
|
||||||
updatedEntries[id] = true
|
updatedEntries[id] = true
|
||||||
else
|
else
|
||||||
|
@@ -91,7 +91,7 @@ const PureSelect = ({
|
|||||||
triggerPopupSameWidth={triggerPopupSameWidth}
|
triggerPopupSameWidth={triggerPopupSameWidth}
|
||||||
>
|
>
|
||||||
<PortalToFollowElemTrigger
|
<PortalToFollowElemTrigger
|
||||||
onClick={() => handleOpenChange(!mergedOpen)}
|
onClick={() => !disabled && handleOpenChange(!mergedOpen)}
|
||||||
asChild
|
asChild
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -116,7 +116,7 @@ const PureSelect = ({
|
|||||||
</div>
|
</div>
|
||||||
</PortalToFollowElemTrigger>
|
</PortalToFollowElemTrigger>
|
||||||
<PortalToFollowElemContent className={cn(
|
<PortalToFollowElemContent className={cn(
|
||||||
'z-10',
|
'z-[9999]',
|
||||||
popupWrapperClassName,
|
popupWrapperClassName,
|
||||||
)}>
|
)}>
|
||||||
<div
|
<div
|
||||||
|
Reference in New Issue
Block a user