mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +08:00
feat: enhance child segment list with total count and input value handling
This commit is contained in:
@ -10,11 +10,10 @@ import ActionButton, { ActionButtonState } from '@/app/components/base/action-bu
|
||||
type EditSliceProps = SliceProps<{
|
||||
label: ReactNode
|
||||
onDelete: () => void
|
||||
onClick?: () => void
|
||||
}>
|
||||
|
||||
export const EditSlice: FC<EditSliceProps> = (props) => {
|
||||
const { label, className, text, onDelete, onClick, ...rest } = props
|
||||
const { label, className, text, onDelete, ...rest } = props
|
||||
const [delBtnShow, setDelBtnShow] = useState(false)
|
||||
const [isDelBtnHover, setDelBtnHover] = useState(false)
|
||||
|
||||
@ -36,10 +35,7 @@ export const EditSlice: FC<EditSliceProps> = (props) => {
|
||||
const isDestructive = delBtnShow && isDelBtnHover
|
||||
|
||||
return (
|
||||
<div onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onClick?.()
|
||||
}}>
|
||||
<div>
|
||||
<SliceContainer {...rest}
|
||||
className={className}
|
||||
ref={refs.setReference}
|
||||
|
||||
Reference in New Issue
Block a user