iteria-app / lowcode

React Lowcode - prototype, develop and maintain internal apps easier

Home Page:https://iteria.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

facade API `getColumnSourcePosition()`

jozef-slezak opened this issue · comments

Please extract the code from insertColumn() or deleteColumn() that finds the position of the column

In should return a object of for three positions (begin and end to highlight in source code editor):

  • valueFormatter of a particular column
  • rendererHeader of a particular column
  • beginning { of a particular column
        const columns = [
            { field: "id", flex: 1, type: "string", valueFormatter: ({ value }) => value, renderHeader: (params: GridColParams) => (<FormattedMessage id="customer.id" defaultMessage="id"/>) },
            { field: "name", flex: 1, type: "string", valueFormatter: ({ value }) => value, renderHeader: (params: GridColParams) => (<FormattedMessage id="customer.name" defaultMessage="name"/>) },
            { field: "createdAt", flex: 1, type: "date", valueFormatter: ({ value }) => intl.formatDate(value), renderHeader: (params: GridColParams) => (<FormattedMessage id="customer.createdAt" defaultMessage="createdAt"/>) },
            { field: "email", flex: 1, type: "string", valueFormatter: ({ value }) => value, renderHeader: (params: GridColParams) => (<FormattedMessage id="customer.email" defaultMessage="email"/>) },
        ];
        return (<div style={{ height: "400px", width: "100%" }}><DataGrid columns={columns} rows={customers}/></div>);