HM-71. Доработки таблицы логов. Универсальной таблице добавлена возможность переопределять рендер строк и заголовков (#31)

This commit is contained in:
Nikolay
2020-07-25 14:23:52 +03:00
committed by GitHub
parent c93a1b8ddb
commit c425ffea45
19 changed files with 231 additions and 63 deletions

View File

@ -0,0 +1,15 @@
import Table from '../table';
import {LOG_COLS, LOG_TYPE} from '../../consts';
import ClientLogsTableRow from './ClientLogsTableRow';
class ClientLogsTable extends Table {
constructor () {
super(null, LOG_COLS[LOG_TYPE.CLIENT]);
}
renderRow = (parentNode, cols, row) => {
return new ClientLogsTableRow(parentNode, cols, row);
}
}
export default ClientLogsTable;

View File

@ -0,0 +1,12 @@
import Component from '../component';
import TableCellOverflow from '../table-cell-overflow';
class ClientLogsTableRow extends Component {
constructor (parentNode, cols, row) {
super(null, parentNode);
this.cols = cols.map((col) => new TableCellOverflow(this.mainNode, row[col.id]));
}
}
export default ClientLogsTableRow;

View File

@ -0,0 +1,3 @@
import ClientLogsTable from './ClientLogsTable';
export default ClientLogsTable;