Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting validateDOMNesting(...): <button> cannot appear as a descendant of <button> error when datepicker modal is oppened on web #323

Closed
daxazala opened this issue Sep 4, 2023 · 15 comments
Labels
bug Something isn't working needs repro Needs reproducible example

Comments

@daxazala
Copy link

daxazala commented Sep 4, 2023

Current behaviour

i am using datepicker modal from react native paper dates and recently updated the libraries with latest versions and then i tried to run the app and noticed below error
react-dom.development.js:86 Warning: validateDOMNesting(...): cannot appear as a descendant of .
at button
at http://localhost:19006/static/js/bundle.js:19090:25
at Pressable (http://localhost:19006/static/js/bundle.js:15866:24)
at TouchableRipple (http://localhost:19006/static/js/bundle.js:11421:20)
at div
at http://localhost:19006/static/js/bundle.js:19090:25
at http://localhost:19006/static/js/bundle.js:25359:90
at http://localhost:19006/static/js/bundle.js:8520:31
at http://localhost:19006/static/js/bundle.js:7453:19
at div
at http://localhost:19006/static/js/bundle.js:19090:25

How to reproduce?

you can reproduce the issue by taking the latest version of react native paper dates and run the examples on web and you can see the issue in browser console.
1.clone react native paper dates repo
2. then build the project and run web script under examples folder
3. go to browser where you web app is running and click calendar button as shown in below screenshot and you will be able to see the error in console.

Preview

What have you tried so far?

Your Environment

software version
react-native 0.72.4
react-native-paper ^5.10.3
react-native-web 0.19.8
node v18.12.1
npm or yarn v8.19.3(npm)
expo sdk ^49.0.9

rnpd-issue-2
rnpd-issue-1

@daxazala daxazala added the bug Something isn't working label Sep 4, 2023
@davidmartinrius
Copy link

Hello, same error here in react native web + rn paper. Did you find any solution?

@iM-GeeKy iM-GeeKy added the needs repro Needs reproducible example label Sep 17, 2023
@iM-GeeKy
Copy link
Collaborator

PRs are welcome!

@github-actions
Copy link
Contributor

Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on snack.expo.dev. If it's not possible to repro it on snack.expo.dev, then you can also provide the repro in a GitHub repository.

@github-actions
Copy link
Contributor

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

@github-actions github-actions bot added the stale label Oct 18, 2023
@kebarvid
Copy link

Have the same issue. Isn't a repro provided in the first post?

@github-actions github-actions bot removed the stale label Oct 26, 2023
@Martijncvv
Copy link

Same problem:
"react-native": "0.72.6",
"expo": "~49.0.13",
"react-native-paper-dates": "^0.19.7",

Copy link
Contributor

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

@github-actions github-actions bot added the stale label Nov 27, 2023
@jweihsSF
Copy link

The issue still occurs, but I don't have a solution yet.

@RichardLindhout
Copy link
Member

Fixed!

@123zarif
Copy link

Still getting the error

@123zarif
Copy link

Anyone else getting the same error?

@schtiefel
Copy link

Yes, still getting the error.

react-native-paper-dates: 0.21.7
react-native-paper: 5.11.0
react-native: 0.72.6
react-native-web: 0.19.9

yngfoxx added a commit to yngfoxx/react-native-paper-dates that referenced this issue Jan 13, 2024
Replaced IconButton with Icon component
yngfoxx added a commit to yngfoxx/react-native-paper-dates that referenced this issue Jan 13, 2024
@yngfoxx
Copy link
Contributor

yngfoxx commented Jan 13, 2024

I have replaced the IconButton with just the Icon component

@RichardLindhout
Copy link
Member

Really cool! The icon component did not exist when I created this library :)

@RichardLindhout
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs repro Needs reproducible example
Projects
None yet
Development

No branches or pull requests

10 participants