fix(bottom-sheet-native): add change detection for bottom sheet dismissal - #24
fix(bottom-sheet-native): add change detection for bottom sheet dismissal#24Andries-Smit wants to merge 1 commit into
Conversation
132cf17 to
c14c92b
Compare
c14c92b to
6597dd5
Compare
6597dd5 to
9c9797c
Compare
9c9797c to
2e6f654
Compare
2e6f654 to
0cc6407
Compare
0cc6407 to
8464602
Compare
8464602 to
8574c8d
Compare
8574c8d to
8da5531
Compare
8da5531 to
32b70a5
Compare
32b70a5 to
56fa8fd
Compare
56fa8fd to
0155044
Compare
0155044 to
2c2c9a3
Compare
|
Hello @Andries-Smit , thank you so much for the contributions 🙇 . It is also included in 11.6 and 11.12 respective versions of the Native Mobile Resources. |
|
@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:
This PR adds an They're solving different problems. |
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
onChangeevent that triggers whenever thetriggerAttributeupdates. 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
onChangeproperty to the attribute and an action element, the triggering of thetriggerAttributeChangewill be handle by the pluggable widget framework when thetriggerAttributeis changed on closing of the bottom sheet.Impact
Enables editing workflows and improves component usability for state management.