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

Datepicker calendar is not showing for React 18 #6462

Closed
codewarrior415 opened this issue Dec 6, 2022 · 2 comments
Closed

Datepicker calendar is not showing for React 18 #6462

codewarrior415 opened this issue Dec 6, 2022 · 2 comments
Labels
answered Issues answered by the EUI team - auto-closes open issues in 7 days if no follow-up response

Comments

@codewarrior415
Copy link

I've created a simple application in React 18 using create-react-app. Added EuiDatePickerRange component which I get from
https://codesandbox.io/s/competent-star-5ipxyl?file=/index.js:109-150 example. I noticed that the calendar does not show up. I verified this by downgrading to react 17 and it works fine.

Here is my package.json
{ "name": "my-app", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "@types/jest": "^27.5.2", "@types/node": "^16.18.6", "@types/react": "^18.0.26", "@types/react-dom": "^18.0.9", "@elastic/datemath": "^5.0.3", "@elastic/eui": "70.4.0", "@emotion/cache": "^11.10.3", "@emotion/css": "^11.10.0", "@emotion/react": "^11.10.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "typescript": "^4.9.3", "web-vitals": "^2.1.4", "moment": "^2.24.0", "moment-timezone": "^0.5.34" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }

@cee-chen
Copy link
Contributor

cee-chen commented Dec 6, 2022

This is covered by #6182 - EUI does not yet support React 18 and all components that make use of portals will not yet work on it.

@cee-chen cee-chen added the answered Issues answered by the EUI team - auto-closes open issues in 7 days if no follow-up response label Dec 6, 2022
@codewarrior415
Copy link
Author

Actually, I figured it out. The issue was <React.StrictMode> If you take out strict mode, it works great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Issues answered by the EUI team - auto-closes open issues in 7 days if no follow-up response
Projects
None yet
Development

No branches or pull requests

2 participants