Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [JsonViewer] Fix the judgment condition for whether to re-init. #2667

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

rashagu
Copy link
Contributor

@rashagu rashagu commented Jan 9, 2025

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

Fixes #
prevProps.options !== this.props.options 这一行通常会返回 true,除非 options 属性引用的是同一个对象
加上value更新时重新init。
之前写法,恰好当其他属性比如value属性改变是也会重新init。

Changelog

🇨🇳 Chinese

  • Fix: 修复JsonViewer 是否重新init的判断条件

🇺🇸 English

  • Fix: Fix JsonViewer the judgment condition for whether to re-init.

Checklist

  • Test or no need
  • Document or no need
  • [] Changelog or no need

Other

  • Skip Changelog

Additional information

Copy link

codesandbox-ci bot commented Jan 9, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit aa3cdad:

Sandbox Source
pr-story Configuration

@YannLynn YannLynn changed the base branch from release to main January 13, 2025 08:53
@YannLynn YannLynn merged commit b4a26d5 into DouyinFE:main Jan 13, 2025
6 of 8 checks passed
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.

2 participants