[Lens] Clean up range operation state handling #83420
Labels
Feature:Lens
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
technical debt
Improvement of the software architecture and operational architecture
The
range
operation ("Intervals" in UI) is currently reading a value from ui settings on first render of the UI, writing it into the persistent datasource state. This is happening to determine the default value for the granularity slider and to use the value for the first range when switching to manual intervals.This has several problems:
To clean this up, the following approach should be taken:
Do not update the state on first render, but keep the ui setting only in the local state of the UI and use it as a fallback if the datasource state value is still null. As soon as the user starts messing with the settings, use the value the user configured and save it in datasource state.
The text was updated successfully, but these errors were encountered: