diff --git a/CHANGELOG.md b/CHANGELOG.md index 5720b04..8a7087d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- DeleteAction now also accepts a promise + ## [2.0.2] - 2022-04-14 ### Fixed diff --git a/src/DeleteAction/DeleteAction.tsx b/src/DeleteAction/DeleteAction.tsx index 893e755..59036fe 100644 --- a/src/DeleteAction/DeleteAction.tsx +++ b/src/DeleteAction/DeleteAction.tsx @@ -9,7 +9,7 @@ interface DeleteActionProps { deleteButtonText?: string; cancelButtonText?: string; iconOnly?: boolean; - onDelete: () => void; + onDelete: () => void | Promise; } function DeleteAction({ @@ -39,9 +39,15 @@ function DeleteAction({