Skip to content

[ES|QL] Add Fast Query Analytics toggle to the editor footer#254856

Draft
stratoula wants to merge 2 commits intoelastic:mainfrom
stratoula:approximate-results-esql
Draft

[ES|QL] Add Fast Query Analytics toggle to the editor footer#254856
stratoula wants to merge 2 commits intoelastic:mainfrom
stratoula:approximate-results-esql

Conversation

@stratoula
Copy link
Contributor

@stratoula stratoula commented Feb 25, 2026

Summary

Closes #254858

Adds an approximateResultsControl prop to the ES|QL editor. When provided, a "Fast results" toggle appears in the editor footer that opens a popover with an On/Off button group. The editor does not act on this setting itself -- it propagates the selected value to consumers so they can include the approximate results option in the _query request.

Consumer usage

const [approximateResults, setApproximateResults] = useState(false);

<ESQLEditor
  approximateResultsControl={{
    enabled: approximateResults,
    onChange: setApproximateResults,
  }}
/>

The toggle is hidden when the prop is not provided.

Checklist

@elasticmachine
Copy link
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

@stratoula stratoula changed the title [ES|QL] Adds an approximate results switch to the editor [ES|QL] Add Fast Query Analytics toggle to the editor footer Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ES|QL] Add Fast Query Analytics toggle to the editor footer

2 participants