File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
client/web/src/routes/Main/Content/Inbox Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import { PillTabPane, PillTabs } from '@/components/PillTabs';
21
21
import { SectionHeader } from '@/components/SectionHeader' ;
22
22
import { openReconfirmModalP } from '@/components/Modal' ;
23
23
import { CommonSidebarWrapper } from '@/components/CommonSidebarWrapper' ;
24
+ import { Virtuoso } from 'react-virtuoso' ;
24
25
25
26
const buildLink = ( itemId : string ) => `/main/inbox/${ itemId } ` ;
26
27
@@ -135,18 +136,31 @@ export const InboxSidebar: React.FC = React.memo(() => {
135
136
{ t ( '收件箱' ) }
136
137
</ SectionHeader >
137
138
138
- < div className = "overflow-hidden" >
139
+ < div className = "overflow-hidden flex-1 " >
139
140
< PillTabs
141
+ className = "h-full"
140
142
items = { [
141
143
{
142
144
key : '1' ,
143
145
label : `${ t ( '全部' ) } ` ,
144
- children : < > { fullList . map ( ( item ) => renderInbox ( item ) ) } </ > ,
146
+ children : (
147
+ < Virtuoso
148
+ className = "h-full"
149
+ data = { fullList }
150
+ itemContent = { ( index , item ) => renderInbox ( item ) }
151
+ />
152
+ ) ,
145
153
} ,
146
154
{
147
155
key : '2' ,
148
156
label : `${ t ( '未读' ) } (${ unreadList . length } )` ,
149
- children : < > { unreadList . map ( ( item ) => renderInbox ( item ) ) } </ > ,
157
+ children : (
158
+ < Virtuoso
159
+ className = "h-full"
160
+ data = { unreadList }
161
+ itemContent = { ( index , item ) => renderInbox ( item ) }
162
+ />
163
+ ) ,
150
164
} ,
151
165
] }
152
166
/>
You can’t perform that action at this time.
0 commit comments