How to use ant-design to add select control to the cell of editable table

how to add a select control to the cells of an editable table with ant-design, and update the state value of the table

clipboard.png
clipboard.png

Mar.31,2021

look at the example getInput this method changes and adds a judgment, and returns the corresponding component

through inputType .
  getInput = () => {
    if (this.props.inputType === 'number') {
      return <InputNumber />;
    }else if (this.props.inputType === 'select') {
      return <Select />;
    }
    return <Input />;
  };

_201910211940041.png

_20191021194239.png


getInput = () => {


};


antddemo


`import React from 'react';
import { Editable } from 'am-editable';
import { Input, Button, InputNumber } from 'antd';

const fields = [
{


},
{


},
{


}
]

export default () => {
return


;
};`
image.png

Menu