Skip to content

❗ React Native Picker Not Working Inside GiftedChat RenderActions Modal #825

Closed as not planned
@AsifNoushad03

Description

@AsifNoushad03

When using GiftedChat's renderActions with a custom modal (e.g., bottom sheet), calling a file/image picker directly from the modal causes the app to crash on Android 12.

⚠️ This issue does not occur on Android 13 or 14.

<GiftedChat
renderActions={(props) => (
<Actions
{...props}
onPressActionButton={() => setVisible(true)} // opens modal
/>
)}
/>

pickFile()}> Choose File

const pickFile = async () => {
pick?.({
type: ['application/pdf'],
})
.then(results => {
// handle result
})
.catch(err => {
console.log('File error:', err);
});
};

File error: Error: Warning: previous promise did not settle and you attempted to overwrite it. You've called "pick" while "pick" was already in progress and has not completed yet.

Your computer environment

Node:
    version: 22.14.0
  npm:
    version: 10.9.2
 react-native:
    installed: 0.79.1
 "@react-native-documents/picker": "^10.1.2",

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions