Lens save modal should conditionally save to library (#85568) (#85591)

This commit is contained in:
Poff Poffenberger 2020-12-10 12:45:11 -06:00 committed by GitHub
parent 3e50fe3f31
commit 8076c3b499
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,7 +90,10 @@ export const SaveModal = (props: Props) => {
savedObjectsTagging={savedObjectsTagging}
savedObjectsClient={savedObjectsClient}
initialTags={tagsIds}
onSave={(saveProps) => onSave(saveProps, { saveToLibrary: false })}
onSave={(saveProps) => {
const saveToLibrary = saveProps.dashboardId === null;
onSave(saveProps, { saveToLibrary });
}}
onClose={onClose}
documentInfo={{
id: lastKnownDoc.savedObjectId,