-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
Component: DatePickerCompatreact-datepicker-compatreact-datepicker-compatStatus: FixedFixed in some PRFixed in some PRType: Bug 🐛
Description
Environment Information
- Package version(s): @fluentui/react-datepicker-compat@0.1.4
- Browser and OS versions:
Describe the issue:
Actual behavior:
When you have controlled components that re-renders the app, the datepicker steals the focus. Its probably has a bad useEffect code that focuses the component every time it renders.
A simple controlled Input component will have its focus stolen when typing a character in the input.
Expected behavior:
The DatePicker should not steal the focus on every render.
If applicable, please provide a codepen repro:
Simple codepen example of the bug:
Type into input which causes a re-render, and focus moves out of input to date picker.
https://codesandbox.io/s/sad-wright-t2hby7?file=/example.tsx:617-627
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? Yes
Requested priority: Blocking
Products/sites affected:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: DatePickerCompatreact-datepicker-compatreact-datepicker-compatStatus: FixedFixed in some PRFixed in some PRType: Bug 🐛