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

[SIEM] Fixes global refresh button re-enabling before map finishes loading #49589

Closed
wants to merge 4 commits into from

Conversation

spong
Copy link
Member

@spong spong commented Oct 29, 2019

Note: This is a draft PR for verifying new API functionality provided by the maps team in #49373

Summary

Fixes #49510

Introduces new useMapLayers hook for exposing a global refresh flag (isLoading) and access to the state of each layer on the map (MapLayer[]).

Hook API:

/**
 * Hook for keeping track of map layer state and when they are loading
 *
 * @returns
 * isLoading: boolean of whether or not at least one layer is currently loading
 * mapLayers: MapLayer[] current state of all layers
 * mapLayerEventHandlers: MapLayerEventHandlers to pass into mapEmbeddableFactory.createFromState() to register handlers
 */
export const useMapLayers = (): Return => { ... };

The MapLayer interface is as follows:

export interface MapLayer {
  layerId: string;
  dataId: string;
  featuresCount: number; 
  errorMessage: string;
  isLoading: boolean;
}

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@spong
Copy link
Member Author

spong commented Jan 6, 2020

Closing till the remainder of this work is prioritized.

@spong spong closed this Jan 6, 2020
@spong spong deleted the maps-loading-fix branch April 12, 2022 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SIEM] Global refresh button re-enables before map finishes loading
2 participants