-
Notifications
You must be signed in to change notification settings - Fork 130
Closed
elastic/kibana
#52619Labels
bugSomething isn't workingSomething isn't workingregressionreleasedIssue released publiclyIssue released publicly
Description
Describe the bug
When sharing the pointer position between multiple charts, if the consumer feed-back the event to the source chart, an error will occur and the a Maximum call stack size exceeded error is thrown.
To Reproduce
Steps to reproduce the behavior:
- Go to Playground
- Copy and paste the following:
Code
```tsx import React from 'react'; import { Chart, Settings, TooltipType, AreaSeries, PointerEvent } from '../src'; import { KIBANA_METRICS } from '../src/utils/data_samples/test_dataset_kibana'; export class Playground extends React.Component { chartRef: React.RefObject = React.createRef(); chartRef2: React.RefObject = React.createRef(); onPointerUpdate = (event: PointerEvent) => { if (this.chartRef && this.chartRef.current) { this.chartRef.current.dispatchExternalPointerEvent(event); } if (this.chartRef2 && this.chartRef2.current) { this.chartRef2.current.dispatchExternalPointerEvent(event); } }; render() { return ( <> Snapshot- Move the mouse over one chart and see the error on console
Expected behavior
No error thrown, the event should be ignored by the chart that emit it
Screenshots
n/a
Version (please complete the following information):
- Elastic Charts: from 15.x
Additional context
On version 14 there was a mechanism to avoid this feedback loop
Errors in browser console
"RangeError: Maximum call stack size exceeded
at eval (webpack://%5Bname%5D/./node_modules/@elastic/charts/node_modules/reselect/lib/index.js?:80:37)
at eval (webpack://%5Bname%5D/./node_modules/@elastic/charts/node_modules/reselect/lib/index.js?:36:25)
at selector (webpack://%5Bname%5D/./node_modules/@elastic/charts/node_modules/re-reselect/dist/index.js?:104:32)
at eval (webpack://%5Bname%5D/./node_modules/@elastic/charts/node_modules/reselect/lib/index.js?:86:37)
at eval (webpack://%5Bname%5D/./node_modules/@elastic/charts/node_modules/reselect/lib/index.js?:36:25)
at selector (webpack://%5Bname%5D/./node_modules/@elastic/charts/node_modules/re-reselect/dist/index.js?:104:32)
at eval (webpack://%5Bname%5D/./node_modules/@elastic/charts/node_modules/reselect/lib/index.js?:86:37)
at eval (webpack://%5Bname%5D/./node_modules/@elastic/charts/node_modules/reselect/lib/index.js?:36:25)
at selector (webpack://%5Bname%5D/./node_modules/@elastic/charts/node_modules/re-reselect/dist/index.js?:104:32)
at eval (webpack://%5Bname%5D/./node_modules/@elastic/charts/node_modules/reselect/lib/index.js?:86:37)"
Kibana Cross Issues
n/a
Checklist
- every related Kibana issue is listed under
Kibana Cross Issueslist -
kibana cross issuetag is associated to the issue if any kibana cross issue is present
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingregressionreleasedIssue released publiclyIssue released publicly