kibana/x-pack/packages/ml/url_state
Walter Rafelsberger 5b1b15af7a
[ML] AIOps: Fix race condition where stale url state would reset search bar. (#154885)
Fixes an issue there the global state `_g` and app state `_a` would get
out of sync and overwrite each other. For example, a click on Refresh in
the date picker (global state) could reset the search bar (app state) to
empty.

The issue was that in `x-pack/packages/ml/url_state/src/url_state.tsx`
the `searchString` could become a stale value in `setUrlState`. This PR
fixes it by using the approach already used in `usePageUrlState`: The
`searchString` is passed on to be stored via `useRef` so that the
`setUrlState` setter can always access the most recent value.
2023-04-18 15:17:49 +02:00
..
src [ML] AIOps: Fix race condition where stale url state would reset search bar. (#154885) 2023-04-18 15:17:49 +02:00
index.ts
jest.config.js
kibana.jsonc
package.json [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
README.md
tsconfig.json Implement package linter (#148496) 2023-01-09 16:49:29 -07:00

@kbn/ml-url-state

URL state management.