force:closeQuickAction
クイックアクションパネルを閉じます。アプリケーションで一度に開くことができるクイックアクションパネルは 1 つのみです。
アクションが完了したか、キャンセルするために、クイックアクションパネルを閉じるには、$A.get("e.force:closeQuickAction").fire(); を実行します。
次の例では、パネルのユーザインターフェースからの入力を処理し、処理結果の「トースト」メッセージを表示した後、クイックアクションパネルを閉じます。処理とトーストは、クイックアクションの終了とは無関係ですが、順序が重要です。force:closeQuickAction の起動は、クイックアクションハンドラが最後に実行する処理であることが必要です。
1/*quickAddController.js*/
2({
3 clickAdd: function(component, event, helper) {
4
5 // Get the values from the form
6 var n1 = component.find("num1").get("v.value");
7 var n2 = component.find("num2").get("v.value");
8
9 // Display the total in a "toast" status message
10 var resultsToast = $A.get("e.force:showToast");
11 resultsToast.setParams({
12 "title": "Quick Add: " + n1 + " + " + n2,
13 "message": "The total is: " + (n1 + n2) + "."
14 });
15 resultsToast.fire();
16
17 // Close the action panel
18 var dismissActionPanel = $A.get("e.force:closeQuickAction");
19 dismissActionPanel.fire();
20 }
21
22})