upgrade to react 19

This commit is contained in:
dswbx
2025-03-11 08:44:49 +01:00
parent 2d7257d2bc
commit 8df30f4dae
11 changed files with 437 additions and 1137 deletions

View File

@@ -19,7 +19,7 @@ type CanvasProps = ReactFlowProps & {
externalProvider?: boolean;
backgroundStyle?: "lines" | "dots";
minimap?: boolean | MiniMapProps;
children?: JSX.Element | ReactNode;
children?: Element | ReactNode;
onDropNewNode?: (base: any) => any;
onDropNewEdge?: (base: any) => any;
};

View File

@@ -74,6 +74,7 @@ export default function ArrayFieldTemplate<
{items.map(
({ key, children, ...itemProps }: ArrayFieldTemplateItemType<T, S, F>) => {
const newChildren = cloneElement(children, {
// @ts-ignore
...children.props,
name: undefined,
title: undefined,

View File

@@ -4,6 +4,7 @@ import {
type ComponentPropsWithoutRef,
Fragment,
type ReactElement,
type ReactNode,
cloneElement,
useState,
} from "react";
@@ -11,7 +12,7 @@ import { twMerge } from "tailwind-merge";
import { useEvent } from "ui/hooks/use-event";
export type DropdownItem =
| (() => JSX.Element)
| (() => ReactNode)
| {
label: string | ReactElement;
icon?: any;