[Metrics UI] Fix first load in Inventory view (#94306)

* Revert inventory changes from commit fa4dda0def

* Remove not needed comment
This commit is contained in:
Ester Martí Vilaseca 2021-03-10 18:06:39 +01:00 committed by GitHub
parent dcaa3f6464
commit fe1220506e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,9 +78,8 @@ export const useWaffleViewState = () => {
region: newState.region,
legend: newState.legend,
});
// if this is the "Default View" view, don't update the time range to the view's time range,
// this way it will use the global Kibana time or the default time already set
if (newState.time && newState.id !== '0') {
if (newState.time) {
setWaffleTimeState({
currentTime: newState.time,
isAutoReloading: newState.autoReload,
@ -102,5 +101,4 @@ export type WaffleViewState = WaffleOptionsState & {
time: number;
autoReload: boolean;
filterQuery: WaffleFiltersState;
id?: string;
};