I'm using Ant Design Editable Table where I would like to edit a table with a dynamic column name. For example:
const EgTable = ({ loc }) => {
const [form] = Form.useForm();
...
const edit = (record) => {
form.setFieldsValue({
date: "",
loc: "",
// I want to set the `loc` according to the `props.loc` I have passed as a parameter because
// the column name is based on the `loc` props.
})
}
}
How can I set so that the loc is dynamic and changes according to the props.loc?