fixes
This commit is contained in:
parent
02078fcaa2
commit
49332e4e68
|
|
@ -58,6 +58,7 @@ export default function ChainEditor({ chain }: ChainEditorProps) {
|
|||
|
||||
<div className="flex grow flex-col items-center justify-center">
|
||||
<ActionEditor
|
||||
actionIndex={actionToEdit ?? 0}
|
||||
initialAction={
|
||||
actionToEdit !== null
|
||||
? (chain.actions?.[actionToEdit] as CommentAction)
|
||||
|
|
@ -75,14 +76,16 @@ export default function ChainEditor({ chain }: ChainEditorProps) {
|
|||
await upsertChain(chain);
|
||||
navigate({ to: "/$namespace/$chainId" });
|
||||
|
||||
setTimeout(
|
||||
() =>
|
||||
actionsListRef.current?.scrollTo({
|
||||
behavior: "smooth",
|
||||
top: actionsListRef.current.scrollHeight,
|
||||
}),
|
||||
0,
|
||||
);
|
||||
if (addingNewAction) {
|
||||
setTimeout(
|
||||
() =>
|
||||
actionsListRef.current?.scrollTo({
|
||||
behavior: "smooth",
|
||||
top: actionsListRef.current.scrollHeight,
|
||||
}),
|
||||
0,
|
||||
);
|
||||
}
|
||||
}}
|
||||
onClose={() => {
|
||||
if (addingNewAction) setAddingNewAction(false);
|
||||
|
|
@ -120,7 +123,9 @@ export default function ChainEditor({ chain }: ChainEditorProps) {
|
|||
chain={chain}
|
||||
action={action}
|
||||
actionIndex={index}
|
||||
onEdit={setActionToEdit}
|
||||
onEdit={(actionIndex) => {
|
||||
setActionToEdit(actionIndex);
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user