Commit d57d33ed by maolipeng

fix:虚拟滚动加载不全

parent c078731a
...@@ -56,7 +56,10 @@ class LiveCourseFilter extends React.Component { ...@@ -56,7 +56,10 @@ class LiveCourseFilter extends React.Component {
StoreService.getStoreUserBasicPage(_query).then((res) => { StoreService.getStoreUserBasicPage(_query).then((res) => {
const { result = {} } = res const { result = {} } = res
const { records = [], total = 0, hasNext } = result const { records = [], total = 0, hasNext } = result
const list = current > 1 ? teacherList.concat(records) : records let tcl = _.map(records,(item)=> {
return {value:item.userId,label:item.nickName}
})
const list = current > 1 ? teacherList.concat(tcl) : tcl
this.setState({ this.setState({
hasNext, hasNext,
teacherList: list, teacherList: list,
...@@ -209,8 +212,10 @@ class LiveCourseFilter extends React.Component { ...@@ -209,8 +212,10 @@ class LiveCourseFilter extends React.Component {
style={{ width: 'calc(100% - 70px)' }} style={{ width: 'calc(100% - 70px)' }}
showSearch showSearch
allowClear allowClear
options={teacherList}
filterOption={(input, option) => option} filterOption={(input, option) => option}
onPopupScroll={this.handleScrollTeacherList} onPopupScroll={this.handleScrollTeacherList}
virtual={false}
suffixIcon={ suffixIcon={
<span className='icon iconfont' style={{ fontSize: '12px', color: '#BFBFBF' }}> <span className='icon iconfont' style={{ fontSize: '12px', color: '#BFBFBF' }}>
&#xe835; &#xe835;
...@@ -244,15 +249,7 @@ class LiveCourseFilter extends React.Component { ...@@ -244,15 +249,7 @@ class LiveCourseFilter extends React.Component {
this.getTeacherList() this.getTeacherList()
} }
) )
}}> }} />
{_.map(teacherList, (item, index) => {
return (
<Select.Option value={item.userId} key={item.userId}>
{item.nickName}
</Select.Option>
)
})}
</Select>
</div> </div>
)} )}
{((expandFilter && User.getUserRole() !== 'CloudLecturer') || User.getUserRole() === 'CloudLecturer') && ( {((expandFilter && User.getUserRole() !== 'CloudLecturer') || User.getUserRole() === 'CloudLecturer') && (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment