I've passed down an array of objects to useVirtual, each object in that array has the following shape:
allCells: (16) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
canExpand: false
cells: (15) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
depth: 0
getRowProps: ƒ (userProps)
getToggleRowExpandedProps: ƒ (userProps)
getToggleRowSelectedProps: ƒ (userProps)
id: "invoice_lines[0]"
index: 0
isExpanded: undefined
isSelected: false
isSomeSelected: false
original: {id: 46317, created_at: "2020-06-28T16:45:34.000000Z", created_by_id: 279, modified_at: "2020-08-20T07:28:26.000000Z", modified_by_id: 1, …}
originalSubRows: []
subRows: []
toggleRowExpanded: ƒ (set)
toggleRowSelected: ƒ (set)
values: {select: undefined, drag: undefined, product_id: 1907, name: "Consult Revisit", created_by_id: 279, …}
__proto__: Object
The hook returned a rather strange object, with some properties displaying an object string.
scrollToIndex: ƒ ()
scrollToOffset: ƒ (toOffset, _temp)
totalSize: "0[object Object]0"
virtualItems: Array(1)
0:
end: "0[object Object]"
index: 0
measureRef: ƒ measureRef(el)
size: {id: "invoice_lines[0]", original: {…}, index: 0, depth: 0, cells: Array(15), …}
start: 0
__proto__: Object
length: 1
__proto__: Array(0)
__proto__: Object
I could not make head nor tail of it. What's the underlying problem ?