Browse Source

react key fixes

Ivan Asmer 4 years ago
parent
commit
d4f3f0214b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/App.js

+ 1 - 1
src/App.js

@@ -202,7 +202,7 @@ const VirtualScroll = ({options, gridHeight, count, rowHeight,  onScroll, record
              style={{maxHeight: gridHeight, height: gridHeight}} >
             <div className='GridContent' 
                  style={{height: count*rowHeight, minHeight: count*rowHeight, maxHeight: count*rowHeight}} >
-                {records && records.map((record,i) =><Fragment key={i}> 
+                {records && records.map((record,i) =><Fragment key={record && record._id || i}> 
                                                 {edit.record && edit.record._id === record._id ? <EditForm model={record.constructor} models={models} record={record} options={options}/>: 
                                                 <Row options={options}>
                                                     {fields.map(field =>