maxs15 / maxs15/react-native-modalbox

Custom onRequestClose when coverScreen is true

Open
#183 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.9k
Forks
496
PR merge metrics
No merged PRs in 30d

Description

Hi, when using coverScreen, the component is wrapped inside React Native's Modal with a predefined onRequestClose (that is, closing the Modalbox).

I think it would be better if we can define our own onRequestClose since not all the time we want to close the modal during back button press. Overriding it using BackHandler does not work either. Would like to make a PR for this if you think is a good idea.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the component code that wraps the modal in React Native's Modal when coverScreen is true, and inspect its predefined onRequestClose behavior. Add support for a caller-defined close handler without assuming the back button should close the modal; done means the custom handler is used in that configuration and the existing behavior remains covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.