Skip to content

Commit

Permalink
Solid: Fix config spread
Browse files Browse the repository at this point in the history
  • Loading branch information
hngngn committed Oct 29, 2024
1 parent be0e9d8 commit d3dbb91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/solid/src/containers/single-container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export function VisSingleContainer<Datum>(
component: undefined,
annotations: undefined,
tooltip: undefined,
...rest,
})
const [track, dirty] = createTrigger()

Expand Down Expand Up @@ -64,7 +63,7 @@ export function VisSingleContainer<Datum>(
init()
// track the changes
track()
chart()?.updateContainer(config)
chart()?.updateContainer({...config, ...rest})
})

const update: VisContainerContextProps['update'] = (key, value) => {
Expand Down
3 changes: 1 addition & 2 deletions packages/solid/src/containers/xy-container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export function VisXYContainer<Datum>(props: VisXYContainerProps<Datum>) {
tooltip: undefined,
xAxis: undefined,
yAxis: undefined,
...rest,
})
const [track, dirty] = createTrigger()

Expand All @@ -67,7 +66,7 @@ export function VisXYContainer<Datum>(props: VisXYContainerProps<Datum>) {
createEffect(() => {
// track the changes
track()
chart()?.updateContainer(config)
chart()?.updateContainer({...config, ...rest})
})

const update: VisContainerContextProps['update'] = (key, value) => {
Expand Down

0 comments on commit d3dbb91

Please sign in to comment.