import { ApolloColumnType } from '../interfaces'; export const findKey = (col: ApolloColumnType) => { let _key; if (col.key) { _key = String(col.key); } else if (Array.isArray(col.dataIndex)) { _key = String(col.dataIndex[col.dataIndex.length - 1]); } else { _key = String(col.dataIndex); } return _key; };