Skip to content

Commit

Permalink
Merge pull request #30099 from mkhutornyi/fix-28036
Browse files Browse the repository at this point in the history
  • Loading branch information
jasperhuangg authored Oct 26, 2023
2 parents 546f27e + 6aeeacf commit e51b21b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState, useCallback, useRef, useMemo} from 'react';
import React, {useState, useCallback, useRef, useMemo, useEffect} from 'react';
import PropTypes from 'prop-types';
import {View, Animated, Keyboard} from 'react-native';
import Str from 'expensify-common/lib/str';
Expand Down Expand Up @@ -137,6 +137,10 @@ function AttachmentModal(props) {
const {translate} = useLocalize();
const {isOffline} = useNetwork();

useEffect(() => {
setFile(props.originalFileName ? {name: props.originalFileName} : undefined);
}, [props.originalFileName]);

const onCarouselAttachmentChange = props.onCarouselAttachmentChange;

/**
Expand Down

0 comments on commit e51b21b

Please sign in to comment.