New Select: Use virtual list (#89290)

* use react-virtual

* Render story with 100k items

* Dyanmic height and TanStack

* Remove weird item

* Add numberOfOptions to story

* Update class name

* Update class name
This commit is contained in:
Tobias Skarhed
2024-06-20 15:51:17 +02:00
committed by GitHub
parent 6834038e91
commit 924a94cf80
4 changed files with 143 additions and 18 deletions

View File

@@ -3684,6 +3684,7 @@ __metadata:
"@storybook/react": "npm:^8.1.6"
"@storybook/react-webpack5": "npm:^8.1.6"
"@storybook/theming": "npm:^8.1.6"
"@tanstack/react-virtual": "npm:^3.5.1"
"@testing-library/dom": "npm:10.0.0"
"@testing-library/jest-dom": "npm:6.4.2"
"@testing-library/react": "npm:15.0.2"
@@ -7803,6 +7804,25 @@ __metadata:
languageName: node
linkType: hard
"@tanstack/react-virtual@npm:^3.5.1":
version: 3.5.1
resolution: "@tanstack/react-virtual@npm:3.5.1"
dependencies:
"@tanstack/virtual-core": "npm:3.5.1"
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
checksum: 10/11c8e9e2391fa0c947848a720b7dccccb1e35a78ac3169d1c34629bbec4ec713eed78d4c17a3e540e01386ee25b600a53254357597ae91a5fe35c7436651e975
languageName: node
linkType: hard
"@tanstack/virtual-core@npm:3.5.1":
version: 3.5.1
resolution: "@tanstack/virtual-core@npm:3.5.1"
checksum: 10/611ea09d37cf9183a51d2dfce401c3802b0d91f014e9bbaf32a6220ec7301b873b308130b795d935c0f5b73a43fd8358274915885da692d3e991eeeab6f8711b
languageName: node
linkType: hard
"@testing-library/dom@npm:10.0.0, @testing-library/dom@npm:>=7, @testing-library/dom@npm:^10.0.0":
version: 10.0.0
resolution: "@testing-library/dom@npm:10.0.0"