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';
2121import { SectionHeader } from '@/components/SectionHeader' ;
2222import { openReconfirmModalP } from '@/components/Modal' ;
2323import { CommonSidebarWrapper } from '@/components/CommonSidebarWrapper' ;
24+ import { Virtuoso } from 'react-virtuoso' ;
2425
2526const buildLink = ( itemId : string ) => `/main/inbox/${ itemId } ` ;
2627
@@ -135,18 +136,31 @@ export const InboxSidebar: React.FC = React.memo(() => {
135136 { t ( '收件箱' ) }
136137 </ SectionHeader >
137138
138- < div className = "overflow-hidden" >
139+ < div className = "overflow-hidden flex-1 " >
139140 < PillTabs
141+ className = "h-full"
140142 items = { [
141143 {
142144 key : '1' ,
143145 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+ ) ,
145153 } ,
146154 {
147155 key : '2' ,
148156 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+ ) ,
150164 } ,
151165 ] }
152166 />
You can’t perform that action at this time.
0 commit comments