Browse Source

fix: show picker modal from within another modal (#429)

master
Henning Hall 3 years ago
committed by GitHub
parent
commit
424731fa7d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      ios/RNDatePicker/RNDatePickerManager.m

+ 7
- 1
ios/RNDatePicker/RNDatePickerManager.m View File

@ -139,7 +139,13 @@ RCT_EXPORT_METHOD(openPicker:(NSDictionary *) props
[popPresenter setPermittedArrowDirections: (UIPopoverArrowDirection) 0]; [popPresenter setPermittedArrowDirections: (UIPopoverArrowDirection) 0];
} }
[rootViewController presentViewController:alertController animated:YES completion:nil];
// Finding the top view controller which is neccessary to be able to show the picker from within modal
UIViewController *topViewController = rootViewController;
while (topViewController.presentedViewController){
topViewController = topViewController.presentedViewController;
}
[topViewController presentViewController:alertController animated:YES completion:nil];
}); });
} }

Loading…
Cancel
Save