Skip to content

Commit 5f74dd2

Browse files
authored
Merge pull request Expensify#74023 from nabi-ebrahimi/fix/map-preview-resize
Fix map preview resizing issue after edit causing partial area rendering
2 parents abe8996 + 17be7f2 commit 5f74dd2

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/ImageWithLoading.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ function ImageWithLoading({
3636
resizeMode,
3737
onLoad,
3838
onLayout,
39+
style,
3940
...rest
4041
}: ImageWithSizeLoadingProps) {
4142
const styles = useThemeStyles();
@@ -85,7 +86,7 @@ function ImageWithLoading({
8586
<Image
8687
// eslint-disable-next-line react/jsx-props-no-spreading
8788
{...rest}
88-
style={[styles.w100, styles.h100]}
89+
style={[styles.w100, styles.h100, style]}
8990
onLoadStart={() => {
9091
if (isLoadedRef.current ?? isLoading) {
9192
return;

src/components/ReceiptImage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ function ReceiptImage({
235235
lastUpdateWidthTimestampRef.current = e.timeStamp;
236236
}}
237237
source={typeof source === 'string' ? {uri: source} : source}
238-
style={[style ?? [styles.w100, styles.h100], styles.overflowHidden]}
238+
style={styles.flex1}
239239
isAuthTokenRequired={!!isAuthTokenRequired}
240240
loadingIconSize={loadingIconSize}
241241
loadingIndicatorStyles={loadingIndicatorStyles}

src/styles/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5471,6 +5471,7 @@ const staticStyles = (theme: ThemeColors) =>
54715471
flexibleHeight: {
54725472
height: 'auto',
54735473
minHeight: 200,
5474+
flex: 1,
54745475
},
54755476

54765477
receiptCellLoadingContainer: {

0 commit comments

Comments
 (0)