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, ie, 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 .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.