鼠标滚轮滚动不适用于选择标记

时间:2018-04-12 11:28:26

标签: javascript reactjs scroll

我在我的组件中添加了材质-UI选择框,最大高度为200px,溢出-y:滚动但是我无法使用鼠标垫或鼠标滚轮滚动,使用箭头键功能正常。 提交我的代码。 提前谢谢。

import React from 'react';
import { Route, Redirect } from 'react-router'
import { Async } from 'react-select';
import Select from 'react-select'
import { renameKeys } from '../utils'
import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';

export class abc extends React.Component {

render() {
const items = [];
for (let i = 0; i < 100; i++ ) {
  items.push(<MenuItem value={i} key={i} primaryText={`Item ${i}`} />);
}
return <section id="scroll-section6" className="explore-res img-bg height-70 d-flex align-items-center">
    <div className="container">
      <div className="row">
        <div className="col-lg-12 mt-5 pt-5">
          <div className="st-sec-content">
            <h1 className="st-sec-heading">EXPLORE RESIDENCES</h1>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-lg-12 justify-content-center">
          <table class="table-responsive">
            <tr>
              <td>
                <SelectField maxHeight={200}>
                  {items}
                </SelectField>
              </td>
            </tr>
          </table>
        </div>
      </div>
    </div >
  </section >
 }
 }

0 个答案:

没有答案
相关问题