From cd253ad3e7d3b4aad15ecb4a32c63e26be43a4fe Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Tue, 9 Feb 2021 10:15:21 +0500 Subject: [PATCH] allow changing size of items where required --- apps/mobile/src/components/SimpleList/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.js index bbada9799..1fd7911d2 100644 --- a/apps/mobile/src/components/SimpleList/index.js +++ b/apps/mobile/src/components/SimpleList/index.js @@ -51,7 +51,7 @@ const SimpleList = ({ }, }) => { const [state] = useTracked(); - const {colors} = state; + const {colors, deviceMode} = state; const [dataProvider, setDataProvider] = useState( new DataProvider((r1, r2) => { return r1 !== r2; @@ -67,7 +67,7 @@ const SimpleList = ({ useEffect(() => { if (loading) return; loadData(); - }, [data, loading]); + }, [data, loading, deviceMode]); const loadData = () => { let mainData = [header, {type: 'empty'}]; @@ -231,7 +231,7 @@ const SimpleList = ({ dataProvider={dataProvider} rowRenderer={_renderRow} onScroll={_onScroll} - //canChangeSize={true} + canChangeSize={true} optimizeForInsertDeleteAnimations //forceNonDeterministicRendering renderFooter={renderFooter}