Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vchart",
"comment": "fix(react-vchart): children of tooltip should not be set to spec",
"type": "none"
}
],
"packageName": "@visactor/vchart"
}
2 changes: 1 addition & 1 deletion packages/react-vchart/src/charts/BaseChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const BaseChart: React.FC<Props> = React.forwardRef((props, ref) => {

if (
!isEqual(newSpec, prevSpec.current, { skipFunction: skipFunctionDiff }) ||
!isEqual(newSpecFromChildren, specFromChildren.current)
!isEqual(newSpecFromChildren, specFromChildren.current, { skipFunction: skipFunctionDiff })
) {
prevSpec.current = newSpec;
specFromChildren.current = newSpecFromChildren;
Expand Down
3 changes: 2 additions & 1 deletion packages/react-vchart/src/components/BaseComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const createComponent = <T extends ComponentProps>(
VChart.useRegisters(registers);
}

const ignoreKeys = ['updateId', 'componentId'];
// tooltip component 不支持 children,其他组件暂时也都不支持
const ignoreKeys = ['updateId', 'componentId', 'children'];
const notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys;

const Comp: React.FC<T> = (props: T) => {
Expand Down