-
Notifications
You must be signed in to change notification settings - Fork 221
fix: honor data prop when spec is supplied in openinula-vchart #4694
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
Open
dyk1454683243-sudo
wants to merge
1
commit into
VisActor:develop
Choose a base branch
from
dyk1454683243-sudo:cursor/fix-openinula-vchart-data-prop-4657-d3eb
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/changes/@visactor/openinula-vchart/fix-data-prop-with-spec-4657.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "changes": [ | ||
| { | ||
| "packageName": "@visactor/openinula-vchart", | ||
| "comment": "fix: honor the data prop when spec is supplied, including data-only updates", | ||
| "type": "patch" | ||
| } | ||
| ], | ||
| "packageName": "@visactor/openinula-vchart" | ||
| } |
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
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
Oops, something went wrong.
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.
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.
[P2] 移除 data 属性后应恢复 spec.data
parseSpec 在 data 缺省时使用 spec.data,但 data 从有效值变为 undefined 时,这个分支会调用 updateFullDataSync(undefined),实际不会恢复 spec.data。
已复现:同一个 spec 对象内的数据为
[{ id: 'id0', values: [{ x: 'A', y: 1 }] }];首次用 data 属性覆盖为同 id、y:10;随后从<VChart spec={spec} data={override} />更新为<VChart spec={spec} />,图表仍显示 10,而重新挂载相同 props 会显示 1。请在撤销可选 data 覆盖时重新解析有效 spec 并更新,使更新与首次渲染保持相同的数据优先级,同时加入撤销覆盖的回归测试。