Persists current kuery value from URL if present (#35795)

This commit is contained in:
Jason Rhodes 2019-04-30 11:07:13 -04:00 committed by GitHub
parent 4ad96bd5eb
commit b4efc956cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,11 +68,17 @@ function getQueryWithRisonParams(location: Location, query: RisonDecoded = {}) {
const encodedG = rison.encode(combinedG);
const encodedA = query._a ? rison.encode(query._a) : '';
return {
const queryWithRisonParams: QueryParams = {
...query,
_g: encodedG,
_a: encodedA
};
if (currentQuery.kuery) {
queryWithRisonParams.kuery = currentQuery.kuery;
}
return queryWithRisonParams;
}
export interface KibanaHrefArgs {