This repository was archived by the owner on Jul 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 374
fix: mutli re-render when editing in form editor #5457
Merged
Merged
Conversation
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
boydc2014
previously approved these changes
Jan 6, 2021
a-b-r-o-w-n
reviewed
Jan 6, 2021
Contributor
a-b-r-o-w-n
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lei9444 make sure to test the changes the debounce on the lg and lu api thoroughly.
Composer/packages/client/src/components/ProjectTree/ProjectTree.tsx
Outdated
Show resolved
Hide resolved
Contributor
|
@lei9444 ping me when you feel confident with the LG/LU api update -- I'll approve it. |
Contributor
Author
Thanks @a-b-r-o-w-n ,I have repro it. when we use the { leading: true, trailing: false }, we may drop some characters. I found you update trailing to true in #4790. And I have tested my PR, it's OK |
boydc2014
approved these changes
Jan 11, 2021
Closed
lei9444
added a commit
to lei9444/BotFramework-Composer-1
that referenced
this pull request
Jun 15, 2021
* fix: mutli re-render when editing in form editor * make the useEffect more efficient Co-authored-by: Dong Lei <donglei@microsoft.com> Co-authored-by: Andy Brown <asbrown002@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Root cause
when updating the dialog data, the state of dialogs in recoil will trigger one re-render. But in the the local state currentDialog will listen to the dialogs in useEffect and then trigger another re-render. The has the same issue.

The debouncedUpdateLgTemplate API used by inline editor will invoke on the leading edge and trailing edge. This may trigger twice re-render.

Task Item
refs #minor
Screenshots