Pickers throw error when autoFocus prop is set
Bug Report
- Package version(s): 4.21.3
- Browser and OS versions: All
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? (Yes, No)
Requested priority: (Blocking, High, Normal, Low) Normal
Products/sites affected: (if applicable)
Describe the issue:
When specifying the autoFocus prop on a Picker, the following console error is thrown on mount
{inputProps: {autoFocus: true}}
Uncaught TypeError: Cannot read property 'value' of undefined
at NormalPeoplePicker.BasePicker.onInputFocus (appstart.js:34549)
at Object.ReactErrorUtils.invokeGuardedCallback (react.js:46008)
at executeDispatch (react.js:39997)
at Object.executeDispatchesInOrder (react.js:40017)
at executeDispatchesAndRelease (react.js:39422)
at executeDispatchesAndReleaseTopLevel (react.js:39433)
at Array.forEach (<anonymous>)
at forEachAccumulated (react.js:52414)
at Object.processEventQueue (react.js:39636)
at runEventQueueInBatch (react.js:46032)
The focus still works, but we should not see this error
Actual behavior:
Console error is thrown
Expected behavior:
No console error should be thrown.
Though I'd have a look at this, but can't find autoFocus in the codebase of latest (4.37.5) at all. IS there still a bug, or could this have been fixed already and should be closed?
autoFocus is part of inputProps. https://github.com/OfficeDev/office-ui-fabric-react/blob/73706e0bee1ca3eede408a9602a6f5dd9258d31e/packages/office-ui-fabric-react/src/components/pickers/BasePicker.Props.ts#L78
I will upgrade Fabric, and see if the issue recurrs
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Fabric React!
This issue has been automatically closed because it has not had recent activity after being marked as stale. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to Fabric React! Why am I receiving this notification?