korbit-ai[bot] commented on code in PR #32734:
URL: https://github.com/apache/superset/pull/32734#discussion_r2001926901
##########
superset-frontend/src/features/databases/UploadDataModel/index.tsx:
##########
@@ -539,6 +540,12 @@ const UploadDataModal:
FunctionComponent<UploadDataModalProps> = ({
}
}, [delimiter]);
+ useEffect(() => {
+ if (show) {
+ setActiveKey('general');
+ }
+ }, [show]);
Review Comment:
### Missing documentation for show effect <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The effect lacks documentation explaining why activeKey needs to be reset
when show changes.
###### Why this matters
Missing context makes it harder for other developers to understand the
purpose of this side effect.
###### Suggested change ∙ *Feature Preview*
// Reset active panel to 'general' when modal is shown
useEffect(() => {
if (show) {
setActiveKey('general');
}
}, [show]);
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5fb6bdf-89bf-4b0a-83d0-2642ab8277dd/upvote)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5fb6bdf-89bf-4b0a-83d0-2642ab8277dd?what_not_true=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5fb6bdf-89bf-4b0a-83d0-2642ab8277dd?what_out_of_scope=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5fb6bdf-89bf-4b0a-83d0-2642ab8277dd?what_not_in_standard=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5fb6bdf-89bf-4b0a-83d0-2642ab8277dd)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:d9397743-5c51-4406-9bf5-929a325f8bb1 -->
[](d9397743-5c51-4406-9bf5-929a325f8bb1)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]