Skip to content

fix: redundant rebuild trigger on every keystroke in editor containers#793

Open
hemantch01 wants to merge 1 commit intoaccordproject:mainfrom
hemantch01:fix/redundant-rebuild-keystroke
Open

fix: redundant rebuild trigger on every keystroke in editor containers#793
hemantch01 wants to merge 1 commit intoaccordproject:mainfrom
hemantch01:fix/redundant-rebuild-keystroke

Conversation

@hemantch01
Copy link

fix: redundant rebuild trigger on every keystroke in editor containers

Closes #779

Changes

  • Removed redundant setTemplateMarkdown(val) function call inside handleChange in TemplateMarkdown.tsx.
  • Removed redundant setModelCto(value) function call inside handleChange in TemplateModel.tsx.
  • Removed redundant setData(value) function call inside handleChange in AgreementData.tsx.

Flags

  • The editor components previously triggered rebuilds twice on every keystroke because useUndoRedo already syncs to the main state internally. This fix ensures each keystroke triggers only a single rebuild. No behavioral changes to state management; just removing the duplication.

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

Signed-off-by: hemantch01 <hemantchaudhary905@gmail.com>
@hemantch01 hemantch01 requested a review from a team as a code owner March 8, 2026 07:06
@netlify
Copy link

netlify bot commented Mar 8, 2026

Deploy Preview for ap-template-playground ready!

Name Link
🔨 Latest commit 2e611b0
🔍 Latest deploy log https://app.netlify.com/projects/ap-template-playground/deploys/69ad1fe1c0682700082c19cc
😎 Deploy Preview https://deploy-preview-793--ap-template-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@23harshitkumar
Copy link
Contributor

@hemantch01 Thanks for taking on this issue!

@sanketshevkar
Copy link
Member

Thanks @23harshitkumar @hemantch01
LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: redundant rebuild trigger on every keystroke in editor containers

3 participants