Skip to content

fix(bottom-sheet-native): add change detection for bottom sheet dismissal - #24

Open
Andries-Smit wants to merge 1 commit into
mendix:mainfrom
Andries-Smit:feat/add-bottom-sheet-on-change
Open

fix(bottom-sheet-native): add change detection for bottom sheet dismissal#24
Andries-Smit wants to merge 1 commit into
mendix:mainfrom
Andries-Smit:feat/add-bottom-sheet-on-change

Conversation

@Andries-Smit

@Andries-Smit Andries-Smit commented Jan 31, 2023

Copy link
Copy Markdown
Contributor

Bug: Bottom Sheet Doesn't Detect Cancellation by Outside Click

The custom bottom sheet component cannot be reliably used for editing workflows because it lacks the ability to detect when users cancel by clicking outside the sheet and bottom sheet is closing. This prevents developers from handling sheet dismissal and resetting form state accordingly.

Solution

Add an onChange event that triggers whenever the triggerAttribute updates. This enables parent components to detect cancellation and other state changes, making the bottom sheet suitable for editing scenarios.

The code changes is minor, as we only need to add the onChange property to the attribute and an action element, the triggering of the triggerAttributeChange will be handle by the pluggable widget framework when the triggerAttribute is changed on closing of the bottom sheet.

Impact

Enables editing workflows and improves component usability for state management.

@Andries-Smit
Andries-Smit requested a review from a team as a code owner January 31, 2023 15:14
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from 132cf17 to c14c92b Compare March 28, 2023 18:44
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from c14c92b to 6597dd5 Compare October 8, 2024 06:59
@vadymv-mendix
vadymv-mendix force-pushed the feat/add-bottom-sheet-on-change branch from 6597dd5 to 9c9797c Compare October 22, 2024 09:03
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from 9c9797c to 2e6f654 Compare March 14, 2025 09:14
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from 2e6f654 to 0cc6407 Compare June 5, 2025 16:46
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from 0cc6407 to 8464602 Compare June 18, 2025 13:30
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from 8464602 to 8574c8d Compare February 27, 2026 09:34
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from 8574c8d to 8da5531 Compare April 30, 2026 11:24
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from 8da5531 to 32b70a5 Compare May 8, 2026 06:29
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from 32b70a5 to 56fa8fd Compare July 1, 2026 14:18
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from 56fa8fd to 0155044 Compare July 23, 2026 09:16
@Andries-Smit Andries-Smit changed the title feat(bottom-sheet-native): add on change fix(bottom-sheet-native): add on change Sep 2, 2026
@Andries-Smit
Andries-Smit force-pushed the feat/add-bottom-sheet-on-change branch from 0155044 to 2c2c9a3 Compare September 2, 2026 07:03
@Andries-Smit Andries-Smit changed the title fix(bottom-sheet-native): add on change feat(bottom-sheet-native): add change detection for bottom sheet dismissal Sep 2, 2026
@Andries-Smit Andries-Smit changed the title feat(bottom-sheet-native): add change detection for bottom sheet dismissal fix(bottom-sheet-native): add change detection for bottom sheet dismissal Sep 2, 2026
@MxKevinBeqo

Copy link
Copy Markdown
Contributor

Hello @Andries-Smit , thank you so much for the contributions 🙇 .
This one seems like it has been a long-running PR but it finally got addressed in this PR here as part of another ticket.

It is also included in 11.6 and 11.12 respective versions of the Native Mobile Resources.

@Andries-Smit

Copy link
Copy Markdown
Contributor Author

@MxKevinBeqo thanks for the review. I appreciate you looking into this.

Please be aware PR #575 addresses a different issue—it fixes the bottom sheet not closing at all. This PR is about something else entirely.

The Actual Need:
We need to detect when the bottom sheet closes, specifically when the user dismisses it by clicking the overlay. Currently:

  • ✓ Closing via nanoflow action works (we can attach workflows)
  • ✗ Closing by overlay click has no event—we can't detect it or trigger any cancel logic

This PR adds an on-change event so we can listen for all dismissals, including overlay clicks, and handle cancellations properly in edit workflows.

They're solving different problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants