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