如何使用空格键从反应材料表的查找字段中选择一个选项?

问题描述

我已经在反应材料表中填充了数据。例如我使用了下面的代码

var columns = [
    { title: "id",field: "id",hidden: true },{
      title: "First Name",field: "first_name"
    },{ title: "Last Name",field: "last_name" },{ title: "Email",field: "email" },{
      title: "Level",field: "level",lookup: { 1: '1',2: '2',3: '3',4: '4',5: '5' },}
  ];

表格是:

<MaterialTable
            title="Resource Editor"
            columns={columns}
            data={data}
            icons={tableIcons}
            options={{
              maxBodyHeight: 325,selection: true,actionsColumnIndex: 0,addRowPosition: 'first',rowStyle: {
                fontSize: 'small',},headerStyle: {
                fontSize: 'small',backgroundColor: '#039be5',color: '#FFF'
              }
            }}
            editable={{
              onRowUpdate: (newData,oldData) =>
                new Promise((resolve) => {
                  handleRowUpdate(newData,oldData,resolve);

                }),onRowAdd: (newData) =>
                new Promise((resolve) => {
                  handleRowAdd(newData,resolve)
                }),onRowDelete: (oldData) =>
                new Promise((resolve) => {
                  handleRowDelete(oldData,}}
          />

在编辑时,当我尝试使用键盘中的空格键从下拉列表中选择一个选项时,我无法这样做。但是我在可编辑示例部分下的 Material Table 站点演示(链接https://material-table.com/#/docs/features/editable)中看到了同样的事情。

请告诉我我的代码有什么问题?

提前致谢..

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)