()
| 252 | // setting the size function notifies observers of the new sizes |
| 253 | const itemHeights = new Map<number, number>(); |
| 254 | const updateItemSizes = () => |
| 255 | setElementSizeFunction((element) => { |
| 256 | if (element.getAttribute("data-testid") === "item") { |
| 257 | const index = Number(element.getAttribute("data-index")); |
| 258 | return new DOMRect(0, 0, 100, itemHeights.get(index) ?? 25); |
| 259 | } |
| 260 | }); |
| 261 | updateItemSizes(); |
| 262 | |
| 263 | const virtualizerRef = createRef<Virtualizer>(); |
no test coverage detected