diff --git a/src/index.js b/src/index.js index 7449fe4..012668a 100644 --- a/src/index.js +++ b/src/index.js @@ -16,13 +16,23 @@ export function patchFlatListProps(options = {}) { function setCustomFlatListWeb(options) { FlatList.defaultProps = { ...FlatList.defaultProps, - //eslint-disable-next-line react/display-name - renderScrollComponent: props => ( + // eslint-disable-next-line react/display-name + renderScrollComponent: (props) => ( } + // eslint-disable-next-line react/prop-types + refreshControl={ + props.onRefresh + ? ( + + ) + : props.refreshControl // fallback to existing refreshControl if any + } /> ), - } + }; }