rollback to virtua v0.9.1

This commit is contained in:
Ren Amamiya 2023-10-11 08:04:20 +07:00
parent 770a63de63
commit c3f399ea0b
4 changed files with 12 additions and 7 deletions

View File

@ -78,7 +78,7 @@
"tailwind-scrollbar": "^3.0.5",
"tauri-controls": "^0.2.0",
"tippy.js": "^6.3.7",
"virtua": "^0.12.0",
"virtua": "0.9.1",
"zustand": "^4.4.3"
},
"devDependencies": {

View File

@ -186,8 +186,8 @@ dependencies:
specifier: ^6.3.7
version: 6.3.7
virtua:
specifier: ^0.12.0
version: 0.12.0(react-dom@18.2.0)(react@18.2.0)
specifier: 0.9.1
version: 0.9.1(react-dom@18.2.0)(react@18.2.0)
zustand:
specifier: ^4.4.3
version: 4.4.3(@types/react@18.2.27)(react@18.2.0)
@ -6669,8 +6669,8 @@ packages:
vfile-message: 3.1.4
dev: false
/virtua@0.12.0(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-aJtKYp1WFFWtGfiH7WDRItde9hCD//c7wR3QybVIcmIPRx27Pbxu+p2ojquWMo3z104Vl/rjby39QNS7qhyM7g==}
/virtua@0.9.1(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-uaFvh+5zCDEenQDgxfIs67kpci7d/3XjdnWP/TdDYLcoXdWKr5ddwiP1g+wybHpXmLqbfJ0X0njmlAvP7GwMdw==}
peerDependencies:
react: '>=16.14.0'
react-dom: '>=16.14.0'

View File

@ -94,7 +94,12 @@ export function ChatScreen() {
</p>
</div>
) : (
<VList ref={listRef} className="h-full scrollbar-none" reverse>
<VList
ref={listRef}
className="h-full scrollbar-none"
mode="reverse"
shift={true}
>
{data.map((message) => renderItem(message))}
</VList>
)}

View File

@ -113,7 +113,7 @@ export function LocalNetworkWidget() {
) : dbEvents.length === 0 ? (
<EventLoader firstTime={true} />
) : (
<VList className="h-full scrollbar-none">
<VList className="h-full scrollbar-none" shift={true}>
{!isFetched ? <EventLoader firstTime={false} /> : null}
{dbEvents.map((item) => renderItem(item))}
<div className="flex items-center justify-center px-3 py-1.5">