SearchKit - Flush Angular cache when saving
authorColeman Watts <coleman@civicrm.org>
Sun, 11 Apr 2021 01:28:20 +0000 (21:28 -0400)
committerColeman Watts <coleman@civicrm.org>
Sun, 11 Apr 2021 01:29:09 +0000 (21:29 -0400)
CRM/Contact/BAO/SavedSearch.php

index 6c4b97674906ab405d71335b5ceb5f750162fc76..23135f1ad1165fdefe4b1e19abfa6b2aa61ea913 100644 (file)
@@ -362,6 +362,11 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_
       }
       $params['modified_id'] = $loggedInContactID;
     }
+
+    // Flush angular caches to refresh search displays
+    if (isset($params['api_params'])) {
+      Civi::container()->get('angular')->clear();
+    }
     return self::writeRecord($params);
   }