[Bug]: DatePicker and DatePicker input are not clickable when loaded with React.lazy #10692
Closed
2 tasks done
Labels
component: date-picker
package: react
carbon-components-react
role: dev 🤖
severity: 2
https://ibm.biz/carbon-severity
type: bug 🐛
Milestone
Package
carbon-components-react
Browser
Chrome
Package version
v10.52.0
React version
v.17.0.2
Description
When I import the DatePicker and DatePickerInput components with React.lazy, the date picker does not set up well.
Calendar does not appear when I click on the date input.
In addition when I tested I found that in some cases the initial date value that I add to the DatePickerInput component's value property does not appear in the input.
It seems that other carbon react form components work well with React lazy.
Additional info:
The example code from the codebox works well without React lazy:
https://codesandbox.io/s/carbon-react-datepicker-non-lazy-example-ldj4x
react-flatpickr works well with React lazy:
https://codesandbox.io/s/react-flatpickr-lazy-example-gvwmy
CodeSandbox example
https://codesandbox.io/s/carbon-react-datepicker-lazy-example-xr50d
Steps to reproduce
Code of Conduct
The text was updated successfully, but these errors were encountered: