Skip to content

Commit 82e89a8

Browse files
committed
workaround for serializing filters
1 parent 2f9c843 commit 82e89a8

File tree

1 file changed

+11
-0
lines changed
  • x-pack/plugins/lens/public/app_plugin

1 file changed

+11
-0
lines changed

x-pack/plugins/lens/public/app_plugin/app.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,17 @@ export function App({
355355
savedObjectId: saveProps.newCopyOnSave ? undefined : lastKnownDoc.savedObjectId,
356356
title: saveProps.newTitle,
357357
};
358+
359+
// Required to serialize filters in by value mode until
360+
// https://github.com/elastic/kibana/issues/77588 is fixed
361+
if (getIsByValueMode()) {
362+
docToSave.state.filters.forEach((filter) => {
363+
if (typeof filter.meta.value === 'function') {
364+
delete filter.meta.value;
365+
}
366+
});
367+
}
368+
358369
const originalInput = saveProps.newCopyOnSave ? undefined : initialInput;
359370
const originalSavedObjectId = (originalInput as LensByReferenceInput)?.savedObjectId;
360371
if (options.saveToLibrary && !originalInput) {

0 commit comments

Comments
 (0)