具有输入框tabIndex的MS Fabric DetailList始终呈现为-1

时间:2018-08-08 19:23:36

标签: spfx office-ui-fabric

我正在将输入框添加到Microsoft Fabric DeatialsList中的列。我在IColumn定义的onRender中进行设置。除tabIndex始终为-1之外,其他所有方法均正常运行。我想将其设置为0。

export default class Scrach extends React.Component<IScrachProps, {}> {
  private testData:{}[]=[{Item:1},
                        {Item:1},
                        {Item:1}];
  private testCols: IColumn[] = [
    {key:"col1",
        name:"Items",
        fieldName:"Item",
        onRender:(item)=>{return(<input style={{width:'3em'}} 
                                        tabIndex={0} 
                                        type="text" 
                                        defaultValue="1" 
                                        onClick={this.selectText}/>);},
        minWidth:60,
        isResizable:false
    }];

  public render(): React.ReactElement<IScrachProps> {
    return (
      <div>
        <DetailsList
          items={this.testData}
          columns={this.testCols}
          setKey="set"
          layoutMode={DetailsListLayoutMode.fixedColumns}
          selectionPreservedOnEmptyClick={true}
          selectionMode={SelectionMode.none}
      /> 
      </div>
    );
  }
}

有什么想法吗?

0 个答案:

没有答案