[Maps] Fix issue preventing TMS from rendering correctly#71946
[Maps] Fix issue preventing TMS from rendering correctly#71946kindsun merged 4 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-gis (Team:Geo) |
nreese
left a comment
There was a problem hiding this comment.
Doesn't reselect already take care of this? createSelector will return a memoized value unless getLayerListRaw's inputs change.
Where was the re-render spinning out of control?
| if (tilemap.url) { | ||
| onSourceConfigChange(); | ||
| } | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps |
There was a problem hiding this comment.
Passing an empty array to useEffect has the effect of only executing once on mount like componentDidMount for functional components. It's the generally accepted stand-in for componentDidMount but still triggers the linter
|
Revised following offline conversation with @nreese (thanks!). There was an upstream issue causing |
nreese
left a comment
There was a problem hiding this comment.
LGTM - thanks for fixing this.
code review
|
@elasticmachine merge upstream |
💚 Build SucceededBuild metricsasync chunks size
History
To update your PR or re-run it, just comment with: |
* master: (214 commits) replacing hard coded links for ela.st (elastic#72240) skip flaky suite (elastic#60865) chore(NA): teardown dynamic dll plugin (elastic#72096) Register navLink actions for declared applications (elastic#72109) Fix value for process.hash.sha256 draggable (elastic#72142) Call setupIngest before fleet_install tests (elastic#72214) [Security Solution][Detections] Better toast errors (elastic#72205) skip flaky suite (elastic#64696) [Security Solution][Detections] Disable exceptions for Threshold and ML rules (elastic#72137) [Security Solution][Detections,Lists] Miscellaneous post-FF fixes (elastic#71990) [baseline/capture] use high-memory nodes with ramDisks (elastic#71894) skip flaky suite (elastic#77207) [Maps] Fix issue preventing TMS from rendering correctly (elastic#71946) using test_user with minimum privs (elastic#71988) Fixed Webhook connector doesn't retain added HTTP header settings (elastic#71924) [Ingest Manager] Do not show enrolling and unenrolling agents as online in agent counters (elastic#71921) [Maps] fix 'New Map' from getting added to recently accessed (elastic#72125) [Visualizations] Pass 'aggs' parameter to custom request handlers (elastic#71423) [Monitoring] Out of the box alert tweaks (elastic#71942) [ML] Fix datafeed start time is incorrect when the job has trailing empty buckets (elastic#71976) ...
* master: (55 commits) updates 'External alerts' tab text (elastic#72237) [Security Solution][Case] Fix connector's dropdown with conflicting requests (elastic#72037) replacing hard coded links for ela.st (elastic#72240) skip flaky suite (elastic#60865) chore(NA): teardown dynamic dll plugin (elastic#72096) Register navLink actions for declared applications (elastic#72109) Fix value for process.hash.sha256 draggable (elastic#72142) Call setupIngest before fleet_install tests (elastic#72214) [Security Solution][Detections] Better toast errors (elastic#72205) skip flaky suite (elastic#64696) [Security Solution][Detections] Disable exceptions for Threshold and ML rules (elastic#72137) [Security Solution][Detections,Lists] Miscellaneous post-FF fixes (elastic#71990) [baseline/capture] use high-memory nodes with ramDisks (elastic#71894) skip flaky suite (elastic#77207) [Maps] Fix issue preventing TMS from rendering correctly (elastic#71946) using test_user with minimum privs (elastic#71988) Fixed Webhook connector doesn't retain added HTTP header settings (elastic#71924) [Ingest Manager] Do not show enrolling and unenrolling agents as online in agent counters (elastic#71921) [Maps] fix 'New Map' from getting added to recently accessed (elastic#72125) [Visualizations] Pass 'aggs' parameter to custom request handlers (elastic#71423) ...
…2203) * Ensure getColors selector modifies and returns the same object * Call onSourceConfigChange on CreateSourceEditor mount * Back out selector update Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…feature-privileges * alerting/consumer-based-rbac: (56 commits) take into account which features available in the active space updates 'External alerts' tab text (elastic#72237) [Security Solution][Case] Fix connector's dropdown with conflicting requests (elastic#72037) replacing hard coded links for ela.st (elastic#72240) skip flaky suite (elastic#60865) chore(NA): teardown dynamic dll plugin (elastic#72096) Register navLink actions for declared applications (elastic#72109) Fix value for process.hash.sha256 draggable (elastic#72142) Call setupIngest before fleet_install tests (elastic#72214) [Security Solution][Detections] Better toast errors (elastic#72205) skip flaky suite (elastic#64696) [Security Solution][Detections] Disable exceptions for Threshold and ML rules (elastic#72137) [Security Solution][Detections,Lists] Miscellaneous post-FF fixes (elastic#71990) [baseline/capture] use high-memory nodes with ramDisks (elastic#71894) skip flaky suite (elastic#77207) [Maps] Fix issue preventing TMS from rendering correctly (elastic#71946) using test_user with minimum privs (elastic#71988) Fixed Webhook connector doesn't retain added HTTP header settings (elastic#71924) [Ingest Manager] Do not show enrolling and unenrolling agents as online in agent counters (elastic#71921) [Maps] fix 'New Map' from getting added to recently accessed (elastic#72125) ...
Resolves #68818. The
map_selectors>getMapColorsselector creates a new array on each call which unnecessarily triggers downstream re-renders as each new array is interpreted as a props change in consuming components. This caused theflyout_bodycomponent to repeatedly attempt to render when passed a new empty array formap_colors.The
getMapsSelectorselector has been modified to update the same variable across multiple calls so that the reference is preserved and there are no downstream effects on rendering.