-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: Split amount is not recalculated when entering 0 as input #49381
Conversation
@rushatgabhane 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] |
@nkdengineer can you please fix the eslint error by migrating to useOnyx |
@rushatgabhane i fixed, please move forward |
}: IOURequestStepDistanceProps) { | ||
const styles = useThemeStyles(); | ||
const {isOffline} = useNetwork(); | ||
const {translate} = useLocalize(); | ||
const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report?.reportID ?? -1}`); | ||
|
||
const [transactionBackup] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION_BACKUP}${transactionID}`); | ||
const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${report ? report?.policyID : '-1'}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If policyID is undefined, we should fallback to -1
const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${report ? report?.policyID : '-1'}`); | |
const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID ?? '-1'}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use usePolicy
that covers this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah let's do that. let's use usePolicy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rushatgabhane i updated, please check again
Reviewer Checklist
Screenshots/VideosAndroid: mWeb ChromeiOS: NativeScreen.Recording.2024-09-16.at.00.30.20.moviOS: mWeb SafariScreen.Recording.2024-09-16.at.00.24.47.movMacOS: Chrome / SafariScreen.Recording.2024-09-16.at.00.08.26.movMacOS: DesktopScreen.Recording.2024-09-16.at.00.20.26.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
✋ 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/Beamanator in version: 9.0.43-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/Beamanator in version: 9.0.43-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.43-6 🚀
|
Details
Fixed Issues
$ #48302
PROPOSAL: #48302 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-resize.mp4
Android: mWeb Chrome
android-mweb-resize.mp4
iOS: Native
ios-resize.mp4
iOS: mWeb Safari
ios-mweb-resize.mp4
MacOS: Chrome / Safari
web-resize.mp4
MacOS: Desktop
desktop-resize.mp4