api.getColumn(id)
Description
Gets an object with the column configurationUsage
api.getColumn(id): object;
Parameters
id
- the id of a column
Returns
The method returns an object with the column
parameters:
Example
The example below shows how to output the "city" column configuration to the console:
import { getData } from "./common/data";
import { Grid } from "@svar-ui/react-grid";
const { data, columns } = getData();
function init(api) {
const column = api.getColumn("city");
console.log("Column:", column);
}
export default function App() {
return <Grid data={data} columns={columns} init={init} />;
}
Related articles: