-
Notifications
You must be signed in to change notification settings - Fork 120
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
Maximum call stack size exceeded on shared pointer position #504
Closed
2 tasks done
Labels
Comments
4 tasks
markov00
added a commit
that referenced
this issue
Jan 2, 2020
This commit fix the issue with the recursive loop created when feeding chart with its own cursor position. BREAKING CHANGE: The `onCursorUpdate` Settings property is changed to a more generic `onPointerUpdate`. The same apply for the event type `CursorEvent` that is now `PointerEvent` and can assume a `PointerOverEvent` or `PointOutEvent` shape (see TS types) fix #504
markov00
pushed a commit
that referenced
this issue
Jan 2, 2020
# [16.0.0](v15.0.5...v16.0.0) (2020-01-02) ### Bug Fixes * **external pointer:** avoid recursive-loops on pointer events ([#503](#503)) ([c170f0d](c170f0d)), closes [#504](#504) ### BREAKING CHANGES * **external pointer:** The `onCursorUpdate` Settings property is changed to a more generic `onPointerUpdate`. The same apply for the event type `CursorEvent` that is now `PointerEvent` and can assume a `PointerOverEvent` or `PointOutEvent` shape (see TS types)
🎉 This issue has been resolved in version 16.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
4 tasks
AMoo-Miki
pushed a commit
to AMoo-Miki/OpenSearch-Dashboards
that referenced
this issue
Feb 10, 2022
# [16.0.0](elastic/elastic-charts@v15.0.5...v16.0.0) (2020-01-02) ### Bug Fixes * **external pointer:** avoid recursive-loops on pointer events ([opensearch-project#503](elastic/elastic-charts#503)) ([8f9c258](elastic/elastic-charts@8f9c258)), closes [opensearch-project#504](elastic/elastic-charts#504) ### BREAKING CHANGES * **external pointer:** The `onCursorUpdate` Settings property is changed to a more generic `onPointerUpdate`. The same apply for the event type `CursorEvent` that is now `PointerEvent` and can assume a `PointerOverEvent` or `PointOutEvent` shape (see TS types)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
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 ( <> SnapshotExpected behavior
No error thrown, the event should be ignored by the chart that emit it
Screenshots
n/a
Version (please complete the following information):
Additional context
On version 14 there was a mechanism to avoid this feedback loop
Errors in browser console
Kibana Cross Issues
n/a
Checklist
Kibana Cross Issues
listkibana cross issue
tag is associated to the issue if any kibana cross issue is presentThe text was updated successfully, but these errors were encountered: