Clear file state on equipment type change in tabular forms#4070
Clear file state on equipment type change in tabular forms#4070flomillot wants to merge 2 commits into
Conversation
In the tabular and limit-sets modification forms, the file/import state (selected file, file error/warning, CSV filename) was only reset through resetOnConfirmation, which runs only when the confirmation popup opens (i.e. when the table is non-empty). Changing the type on an empty table skipped the popup and left a stale selected file or file message from the previous type. Split the reset: the destructive table/properties reset stays behind confirmation (resetOnConfirmation), while the file state is now cleared on every type change through the new resetOnChange prop of InputWithPopupConfirmation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughBoth Split type-change reset callbacks
Suggested Reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: one or more packages not found in the registry. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This tolerance is handled in a dedicated change; drop it here to avoid duplicating it across pull requests. Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
|



Summary
In the tabular and limit-sets modification forms, the file/import state (selected file, file error/warning, CSV filename) was reset only through
resetOnConfirmation, which runs only when the confirmation popup opens — i.e. when the table is non-empty. Changing the equipment type on an empty table skipped the popup, leaving a stale selected file or file message from the previous type.The reset is now split:
resetOnConfirmation— the destructive table/properties reset stays gated behind confirmation.resetOnChange— the file state is cleared on every type change.Dependency
Relies on the new
resetOnChangeprop ofInputWithPopupConfirmation: gridsuite/commons-ui#1216. Requires that change to be released before this one is functional.