Skip to content

Commit

Permalink
Bump back to react-virtuoso which was itemSize merged.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenh committed Jun 1, 2021
1 parent 5dc6894 commit a6ce36b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"react-aria": "^3.6.0",
"react-day-picker": "^7.4.10",
"react-stately": "^3.5.0",
"@homebound/react-virtuoso": "^1.8.6",
"react-virtuoso": "^1.9.0",
"tributejs": "^5.1.3",
"trix": "^1.3.1"
},
Expand Down
5 changes: 4 additions & 1 deletion src/components/GridTable.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Components, Virtuoso } from "@homebound/react-virtuoso";
import memoizeOne from "memoize-one";
import { Observer } from "mobx-react";
import React, {
Expand All @@ -12,6 +11,7 @@ import React, {
useState,
} from "react";
import { Link } from "react-router-dom";
import { Components, Virtuoso } from "react-virtuoso";
import { navLink } from "src/components/CssReset";
import { Icon } from "src/components/Icon";
import { Css, Margin, Only, Palette, Properties, px, Xss } from "src/Css";
Expand Down Expand Up @@ -458,6 +458,9 @@ function renderVirtual<R extends Kinded>(
<Virtuoso
components={{ List: VirtualRoot(style, columns, id, xss) }}
topItemCount={stickyHeader ? headerRows.length : 0}
// Both the `Item` and `itemContent` use `display: contents`, so their height is 0,
// so instead drill into the 1st real content cell.
itemSize={(el) => (el.firstElementChild!.firstElementChild! as HTMLElement).offsetHeight}
itemContent={(index) => {
// We keep header and filter rows separate, but react-virtuoso is a flat list,
// so we pick the right header / first row message / actual row.
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1382,16 +1382,6 @@
resolved "https://registry.yarnpkg.com/@homebound/form-state/-/form-state-1.0.2.tgz#da581bf9951a7d6ce9036133246d17a367488a99"
integrity sha512-1PfejczCNuENqAaM6m60k9CspmdXqXyhErakuSPPMUJi751++ss9V0ZTIhZ1faSrL/I7LUVvOSG36CMLb0lv2w==

"@homebound/react-virtuoso@^1.8.6":
version "1.8.6"
resolved "https://registry.yarnpkg.com/@homebound/react-virtuoso/-/react-virtuoso-1.8.6.tgz#6281518dd5d6496200312375e96b38b58108c949"
integrity sha512-DYFFmC+WMraFi9d6DiG90kp0eJt/57UCtxyl6FgIrO3tF665o0UUguL24/r5X9a7bFs6BJDZwlXnFjFK/utFWQ==
dependencies:
"@virtuoso.dev/react-urx" "^0.2.5"
"@virtuoso.dev/urx" "^0.2.5"
react-app-polyfill "^1.0.6"
resize-observer-polyfill "^1.5.1"

"@homebound/rtl-utils@^1.39.0":
version "1.39.0"
resolved "https://registry.yarnpkg.com/@homebound/rtl-utils/-/rtl-utils-1.39.0.tgz#5774d941cc2830dc474641167995e90f8c83f43c"
Expand Down Expand Up @@ -13078,6 +13068,16 @@ react-textarea-autosize@^8.3.0:
use-composed-ref "^1.0.0"
use-latest "^1.0.0"

react-virtuoso@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/react-virtuoso/-/react-virtuoso-1.9.0.tgz#5223d82b4b88021e73cd7cb671824e65537ce3ed"
integrity sha512-7ugCTy+zuKIplhhRLvOVHjyluLeB/BNBF2XwwJyKifsQNY/H565BV4yJYzejbmusdFGI7Dt8iJi1Zb9Nfj/pew==
dependencies:
"@virtuoso.dev/react-urx" "^0.2.5"
"@virtuoso.dev/urx" "^0.2.5"
react-app-polyfill "^1.0.6"
resize-observer-polyfill "^1.5.1"

react@^16.11.0, react@^16.12.0, react@^16.14.0, react@^16.8.3:
version "16.14.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d"
Expand Down

0 comments on commit a6ce36b

Please sign in to comment.