Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Discover] Refactor totalHits$ loading state handling to omit r…
…ace conditions (#196114) (#197166) # Backport This will backport the following commits from `main` to `8.x`: - [[Discover] Refactor totalHits$ loading state handling to omit race conditions (#196114)](#196114) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Matthias Wilhelm","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-22T06:06:38Z","message":"[Discover] Refactor totalHits$ loading state handling to omit race conditions (#196114)\n\nFix loading state management in `use_discover_histogram.ts`\r\n\r\nMoving the loading state for `totalHits# Backport This will backport the following commits from `main` to `8.x`: - [[Discover] Refactor totalHits$ loading state handling to omit race conditions (#196114)](#196114) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT to the `fetchAll` function, which is executed before the hook. This ensures that the loading state is set at a higher level, preventing a situation where the overall data fetching is in a `loading` state, but the histogram is marked as `complete` while receiving new properties (like a new data view ID) without access to refreshed data views.","sha":"722a913c54cd1521d615f9b093d6dd495c65fde9","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Discover","release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor"],"title":"[Discover] Refactor totalHits$ loading state handling to omit race conditions","number":196114,"url":"https://github.com/elastic/kibana/pull/196114","mergeCommit":{"message":"[Discover] Refactor totalHits$ loading state handling to omit race conditions (#196114)\n\nFix loading state management in `use_discover_histogram.ts`\r\n\r\nMoving the loading state for `totalHits# Backport This will backport the following commits from `main` to `8.x`: - [[Discover] Refactor totalHits$ loading state handling to omit race conditions (#196114)](#196114) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT to the `fetchAll` function, which is executed before the hook. This ensures that the loading state is set at a higher level, preventing a situation where the overall data fetching is in a `loading` state, but the histogram is marked as `complete` while receiving new properties (like a new data view ID) without access to refreshed data views.","sha":"722a913c54cd1521d615f9b093d6dd495c65fde9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196114","number":196114,"mergeCommit":{"message":"[Discover] Refactor totalHits$ loading state handling to omit race conditions (#196114)\n\nFix loading state management in `use_discover_histogram.ts`\r\n\r\nMoving the loading state for `totalHits# Backport This will backport the following commits from `main` to `8.x`: - [[Discover] Refactor totalHits$ loading state handling to omit race conditions (#196114)](#196114) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT to the `fetchAll` function, which is executed before the hook. This ensures that the loading state is set at a higher level, preventing a situation where the overall data fetching is in a `loading` state, but the histogram is marked as `complete` while receiving new properties (like a new data view ID) without access to refreshed data views.","sha":"722a913c54cd1521d615f9b093d6dd495c65fde9"}}]}] BACKPORT--> Co-authored-by: Matthias Wilhelm <[email protected]>
- Loading branch information