added ability to close current view after clicking on action. Use closeWhenDone: true inside view's action