aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-08-09 21:16:40 +0300
committereug-vs <eug-vs@keemail.me>2020-08-09 21:16:40 +0300
commit992b12d3bab79e749bc25eb5a17981853ff3c216 (patch)
treea84ffbf58ee86d07087dac296a3da1714746164a /src
parentb6f9dbc3cbb21447fdeb22420b005da37de2af8e (diff)
downloadwhich-ui-992b12d3bab79e749bc25eb5a17981853ff3c216.tar.gz
fix: re-render Feed correctly
Diffstat (limited to 'src')
-rw-r--r--src/components/Feed/Feed.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/Feed/Feed.tsx b/src/components/Feed/Feed.tsx
index 9918a3d..b857cc0 100644
--- a/src/components/Feed/Feed.tsx
+++ b/src/components/Feed/Feed.tsx
@@ -20,7 +20,8 @@ const Feed: React.FC<PropTypes> = ({ polls }) => {
const RenderItem: React.FC<RenderPropTypes> = ({ index, style, key }) => {
const poll = polls[index];
return (
- <div key={key} style={style}>
+ // To re-render on list resize, add this info to key
+ <div key={key + polls.length} style={style}>
<PollCard initialPoll={poll} />
</div>
);