Skip to content

Conversation

@adids1221
Copy link
Contributor

@adids1221 adids1221 commented Jan 20, 2026

Description

Fixes an issue where the onDismiss callback passed via modalProps or dialogProps was being called twice when the overlay was dismissed.

The issue occurred because closeExpandable was being triggered from multiple sources:

  1. From onBackgroundPress / onRequestClose when user dismissed the modal
  2. From React Native Modal's internal onDismiss callback

Added a new dismissOverlay function that only closes the UI without calling the user's callback. Modal's onDismiss now uses dismissOverlay, while onBackgroundPress and onRequestClose continue to use closeExpandable.

Verified that components using ExpandableOverlay are not affected:

  • Picker - all tests pass
  • DateTimePicker - all tests pass

Changelog

ExpandableOverlay - Fixed onDismiss callback being called twice when modal is dismissed.

Additional info

MADS-4656
Old PR (Closed because of conflicts, all the comments there are fixed here)

@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

✅ PR Description Validation Passed

All required sections are properly filled out:

  • Description
  • Changelog
  • Additional info

Your PR is good for review! 🚀


This validation ensures all sections from the PR template are properly filled.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants