Skip to content
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

[Lens]: Embeddability API: Add callbacks for event handlers #90925

Closed
flash1293 opened this issue Feb 10, 2021 · 1 comment · Fixed by #94670
Closed

[Lens]: Embeddability API: Add callbacks for event handlers #90925

flash1293 opened this issue Feb 10, 2021 · 1 comment · Fixed by #94670
Assignees
Labels
enhancement New value added to drive a business result Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@flash1293
Copy link
Contributor

flash1293 commented Feb 10, 2021

Currently chart events in Lens are translated into ui actions in the embeddable. This makes sense for the dashboard integration, but in case of embedded Lens visualizations using the exposed EmbeddableComponent, integration is easier if it's possible to pass in callback functions which are called directly.

This includes:

  • Extending EmbeddableComponentProps/LensEmbeddableInput with callbacks: onBrush(data: LensBrushEvent['data']): void etc.
  • In x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.tsx, in handleEvent check whether there is a callback passed in via input - if that's the case call it instead of execution an action
  • Provide support for the following events: brushing, filtering, table row click, edit event (sorting/resizing)
  • Also, provide a callback for changes in loading state (if expression changes and re-renders, loading state becomes true, once onData$ gets fired from the expression renderer component, it becomes false again.)
@flash1293 flash1293 added enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Feb 10, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants