Repository navigation
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7638.
Opening 编辑参数, closing without save, then 添加参数 reused the leftover
currentIndex/ edit state and overwrote the previously edited row instead of appending.Change
openAddDialog/openAddInitDialog) now always setcurrentIndexto the provided index ornullwhen adding.isEdit/currentIndexwhen opened without a row.Touched the workflow + tool form surfaces listed in the issue (基本信息接口传参 / 自定义工具输入参数 / 工具用户输入与输出参数 / 普通工具启动与输入参数).
Test plan
AI disclosure
Prepared with AI assistance (Grok Bot / CodeCron deep-participation). I reviewed the diff and the issue reproduction path.