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][ES|QL] Do not refetch the attributes if the query hasn't changed #195196

Merged
merged 6 commits into from
Oct 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move the comment too
  • Loading branch information
stratoula committed Oct 9, 2024
commit be33c85675d3ecae77343d1246ba67f49c4762a6
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ export function LensEditConfigurationFlyout({

const runQuery = useCallback(
async (q: AggregateQuery, abortController?: AbortController) => {
// do not run the suggestions if the query is the same as the previous one
const attrs = await getSuggestions(
q,
startDependencies,
Expand Down Expand Up @@ -498,6 +497,7 @@ export function LensEditConfigurationFlyout({
editorIsInline
hideRunQueryText
onTextLangQuerySubmit={async (q, a) => {
// do not run the suggestions if the query is the same as the previous one
if (q && !isEqual(q, prevQuery.current)) {
setIsVisualizationLoading(true);
await runQuery(q, a);
Expand Down