mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
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. |
||
---|---|---|
.. | ||
src | ||
index.ts | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
README.md | ||
tsconfig.json |
@kbn/ml-url-state
URL state management.