[Canvas] Only fetch saved elements once#71310
Conversation
|
Pinging @elastic/kibana-canvas (Team:Canvas) |
|
Nice catch, but the bug is that
As such, you don't need the https://reactjs.org/docs/hooks-effect.html EDIT: I'm betting this is going to trigger the |
|
@clintandrewhall Yep, the Should we go forward with this way, or intentionally disable |
|
Let's go with this for now... we need the bug fix. Let's look into some better ways to do this/refactor the props to not need a function/etc for the next release. |
|
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* master: (21 commits) [Maps] 7.9 design improvements (elastic#71563) [ML] Changing all calls to ML endpoints to use internal user (elastic#70487) [eventLog] prevent log writing when initialization fails (elastic#71339) [Observability] landing page always being displayed (elastic#71494) [IM] Address data stream copy feedback (elastic#71615) [Logs UI] Anomalies page dataset filtering (elastic#71110) [data.search.aggs] Remove `use_field_mapping` from top hits agg (elastic#71168) [ML] Anomaly swim lane embeddable navigation and filter actions (elastic#71082) Fixes typo in siem_cloudtrail job description (elastic#71569) Require granted API Keys to have a name (elastic#71623) Update getUsageForCollection (elastic#71609) Only fetch saved elements once (elastic#71310) [SecuritySolution][Resolver] Adding siem index and guarding process ancestry (elastic#71570) [APM] Additional data telemetry changes (elastic#71112) [Visualize] Fix export table for table export links (elastic#71249) [Search] Server side search API (elastic#70446) use inclusive language (elastic#71607) [Security Solution] Hide timeline footer when Resolver is open (elastic#71516) [Index template wizard] Remove shadow and use border for components panels (elastic#71606) [ML] Kibana API endpoint for histogram chart data (elastic#70976) ...
Summary
Saw this bug where there was no requirements on a
useEffectso when you went to add a Custom Element, it would repeatedly request the custom elements.This adds requirements to the
useEffectand adds a ref that gets flipped because thefindCustomElementsfunction is a new function on every rerender 😦