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: [Tree] fix onChange value error in treeDataSimpleJson mode #2601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YyumeiZhang
Copy link
Collaborator

@YyumeiZhang YyumeiZhang commented Dec 2, 2024

中文模板 / 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
#2508 提出的问题的部分修复。
当前 pr 仅处理了 onChange 回调结果错误问题。不处理 treeDataSimpleJson 模式下,因为无受控的处理逻辑导致受控模式结果不符合预期问题(详情见 issue 中)。

修复逻辑:

  1. 将 json 模式下,key 的链接符从 - 变成 SEMI_TREE_SPLIT,防止因为内部本身有 - 导致拆分时候出现错误。
  2. 见 replace 替换成 replaceAll,替换所有特殊链接符号。

Changelog

🇨🇳 Chinese


🇺🇸 English

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

Copy link

codesandbox-ci bot commented Dec 2, 2024

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 acda2e4:

Sandbox Source
pr-story Configuration

Copy link

cypress bot commented Dec 2, 2024

semi-design    Run #2976

Run Properties:  status check failed Failed #2976  •  git commit 4f2ebdb265 ℹ️: Merge acda2e4b5d39b8b98bc2bd3f0a40151cc84318f9 into 36759e2b48ce7d0d58093bff2d78...
Project semi-design
Branch Review find/tree-json
Run status status check failed Failed #2976
Run duration 07m 51s
Commit git commit 4f2ebdb265 ℹ️: Merge acda2e4b5d39b8b98bc2bd3f0a40151cc84318f9 into 36759e2b48ce7d0d58093bff2d78...
Committer YyumeiZhang
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 11
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 275
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

Tests for review

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.

1 participant