fix: error in time modal picker - #62631
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
I am a little stuck on the Android and iOS Native builds, will add later |
|
@shubham1206agra Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| shouldHideClearButton = false, | ||
| }: DateInputWithPickerProps, | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| ref: ForwardedRef<View>, |
There was a problem hiding this comment.
@nkdengineer Why can't we use this ref as textInputRef?
There was a problem hiding this comment.
@shubham1206agra The component has two refs:
- A forwarded ref (ref: ForwardedRef) that's passed from the parent component - the purpose here is just to fix the error
- A local textInputRef that's used to reference the TextInput component
So we can't use textInputRef in here
There was a problem hiding this comment.
No, replace the local ref with forwardedRef. What is the issue exactly?
There was a problem hiding this comment.
@shubham1206agra as you can see in here, we are using forwardRef and it needs 2 params is props and ref
App/src/components/DatePicker/index.tsx
Line 161 in 37a592e
App/src/components/DatePicker/index.tsx
Lines 16 to 32 in b2f5d0b
There was a problem hiding this comment.
I mean remove the localRef and use forwardedRef instead
There was a problem hiding this comment.
LocalRef uses useRef, it has current property and forwardedRef don't have this property so we can't replace the local ref with forwardedRef.
There was a problem hiding this comment.
ref={mergeRefs(ref, textInputRef)}
@nkdengineer Use it like this.
|
@nkdengineer Bump here |
|
@shubham1206agra i updated |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppNA Android: mWeb ChromeNA iOS: HybridAppNA iOS: mWeb SafariNA MacOS: Chrome / SafariScreen.Recording.2025-06-05.at.3.08.38.PM.movMacOS: DesktopScreen.Recording.2025-06-05.at.3.25.55.PM.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/jasperhuangg in version: 9.1.63-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.1.63-6 🚀
|

Explanation of Change
Fixed Issues
$ #61595
PROPOSAL: #61595 (comment)
Tests
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
abdr.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
Screen_Recording_2025-06-09_at_01.16.36.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
wbe.mov
MacOS: Desktop
desktop.mov