mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
feat: undo-redo & edit snapshots (#2436)
* feat: undo-redo & edit snapshots * fix merge * add simple history back * fix some undo * change app latest version * fix * chatconfig * fix snapshot * fix * fix * fix * fix compare * fix initial * fix merge: * fix useEffect * fix snapshot initial and saved state * chore * fix * compare snapshot * nodes edges useEffct * fix chatconfig * fix * delete unused method * fix * fix * fix * default version name
This commit is contained in:
@@ -17,6 +17,7 @@ interface Props extends PopoverContentProps {
|
||||
hasArrow?: boolean;
|
||||
children: (e: { onClose: () => void }) => React.ReactNode;
|
||||
onCloseFunc?: () => void;
|
||||
onOpenFunc?: () => void;
|
||||
closeOnBlur?: boolean;
|
||||
}
|
||||
|
||||
@@ -27,6 +28,7 @@ const MyPopover = ({
|
||||
trigger,
|
||||
hasArrow = true,
|
||||
children,
|
||||
onOpenFunc,
|
||||
onCloseFunc,
|
||||
closeOnBlur = false,
|
||||
...props
|
||||
@@ -39,7 +41,10 @@ const MyPopover = ({
|
||||
<Popover
|
||||
isOpen={isOpen}
|
||||
initialFocusRef={firstFieldRef}
|
||||
onOpen={onOpen}
|
||||
onOpen={() => {
|
||||
onOpen();
|
||||
onOpenFunc && onOpenFunc();
|
||||
}}
|
||||
onClose={() => {
|
||||
onClose();
|
||||
onCloseFunc && onCloseFunc();
|
||||
|
Reference in New Issue
Block a user