[WEB-2013] fix: issue link modal preloading previous data#5240
[WEB-2013] fix: issue link modal preloading previous data#5240SatishGandham merged 1 commit intopreviewfrom
Conversation
WalkthroughThe recent changes to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/core/components/issues/issue-detail/links/create-update-link-modal.tsx (5 hunks)
Additional comments not posted (4)
web/core/components/issues/issue-detail/links/create-update-link-modal.tsx (4)
4-4: LGTM!The addition of the
observerfunction frommobx-reactis appropriate for making the component reactive to observable state changes.
31-31: LGTM!Wrapping the component with the
observerfunction ensures it re-renders when observable data changes, which is necessary for proper state management with MobX.
49-49: LGTM!The inclusion of
reset(defaultValues)in theonClosefunction ensures the form resets to its default state whenever the modal is closed, preventing stale data from persisting.
60-61: LGTM!The update to the
useEffecthook ensures the form is reset with the combined values ofdefaultValuesandpreloadedDataonly when the modal is actively being displayed, optimizing performance and preventing unnecessary resets.
Problem:
Solution:
Reference:
[WEB-2013]
Media:
Summary by CodeRabbit
New Features
Improvements