I am using Antd table and I have my toys object as below
{
"Truck": "Black",
"Bike": "White",
"Car": "Blue",
"Bicycle": "Black"
}
Now I want a table using antd table as below. Here, the 1st column is text and the second column must be an input field, i.e., the color must be editable.
| Toys | Color |
|---|---|
| Truck | Black |
| Bike | White |
| Car | Blue |
| Bicycle | Black |
Can anyone help me to solve this?
Here is the codesandbox, that I've created for you
https://codesandbox.io/s/antd-editable-0izgw
You need to pass {editable: true} only to make the column editable.
I've take the reference from antd official website. You can learn more here.