# Exampel of Collecting role information on Dismiss shows wrong logs

**URL:** <https://forum.ionicframework.com/t/exampel-of-collecting-role-information-on-dismiss-shows-wrong-logs/247062>\
**Category:** Ionic React\
**Created:** [March 9, 2025, 7:02pm UTC](https://forum.ionicframework.com/t/exampel-of-collecting-role-information-on-dismiss-shows-wrong-logs/247062 "2025-03-09T19:02:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DorKeinath](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@DorKeinath](https://forum.ionicframework.com/u/DorKeinath)\
**Post date:** [March 9, 2025, 7:02pm UTC](https://forum.ionicframework.com/t/exampel-of-collecting-role-information-on-dismiss-shows-wrong-logs/247062/1 "2025-03-09T19:02:50Z")

</div>

> **[ion-action-sheet | Ionic Documentation](https://ionicframework.com/docs/api/action-sheet#collecting-role-information-on-dismiss)**
>
> ion-action-sheet: Action Sheet Dialog for iOS and Android

The example under “Collecting role information on Dismiss” is not working. Instead of showing different logs, console logs only

```auto
{
  "role": "backdrop"
}

```

data is passed as undefined.

---

<div class="post-metadata">

**Author:** ![twestrick](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/twestrick/32/136131_2.png) [@twestrick](https://forum.ionicframework.com/u/twestrick)\
**Post date:** [March 10, 2025, 1:06pm UTC](https://forum.ionicframework.com/t/exampel-of-collecting-role-information-on-dismiss-shows-wrong-logs/247062/2 "2025-03-10T13:06:31Z")

</div>

I just ran the React example in StackBlitz and am getting the expected results 🤔

```auto
{
  "data": {
    "action": "delete"
  },
  "role": "destructive"
}

```

```auto
{
  "data": {
    "action": "cancel"
  },
  "role": "cancel"
}

```

```auto
{
  "data": {
    "action": "share"
  }
}

```

```auto
{
  "role": "backdrop"
}

```
