Skip to content

fix(ui): clear param edit index when opening add after cancel - #7690

Open
ump45nose wants to merge 1 commit into
1Panel-dev:v2from
ump45nose:fix/7638-param-edit-cancel-overwrite
Open

ump45nose wants to merge 1 commit into
1Panel-dev:v2from
ump45nose:fix/7638-param-edit-cancel-overwrite

Conversation

@ump45nose

Copy link
Copy Markdown
Contributor

Summary

Fixes #7638.

Opening 编辑参数, closing without save, then 添加参数 reused the leftover currentIndex / edit state and overwrote the previously edited row instead of appending.

Change

  • Parent open helpers (openAddDialog / openAddInitDialog) now always set currentIndex to the provided index or null when adding.
  • Param dialogs that own edit state clear isEdit / currentIndex when opened without a row.

Touched the workflow + tool form surfaces listed in the issue (基本信息接口传参 / 自定义工具输入参数 / 工具用户输入与输出参数 / 普通工具启动与输入参数).

Test plan

  • Edit a parameter, cancel/close the dialog, add a new parameter — new row is appended; previous row unchanged.
  • Edit then save still updates the same row.
  • Manual UI check only (no automated UI test for these dialogs).

AI disclosure

Prepared with AI assistance (Grok Bot / CodeCron deep-participation). I reviewed the diff and the issue reproduction path.

Editing a parameter set currentIndex, but cancel left it set; the next
add then overwrote that row. Always reset the index when opening add,
and clear edit state when dialogs open without a row.

Fixes 1Panel-dev#7638
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant