fix: 🐛 Pick cellHeight from options

HyperList should take cellHeight from options
This commit is contained in:
Faris Ansari 2018-10-10 16:48:08 +05:30
parent cbe9f4858b
commit 01d74ef6ad
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ export default class BodyRenderer {
renderRows(rows) { renderRows(rows) {
let config = { let config = {
itemHeight: 40, itemHeight: this.options.cellHeight,
total: rows.length, total: rows.length,
generate: (index) => { generate: (index) => {
const el = document.createElement('div'); const el = document.createElement('div');
@ -30,7 +30,7 @@ export default class BodyRenderer {
const rows = this.datamanager.getRowsForView(); const rows = this.datamanager.getRowsForView();
let config = { let config = {
itemHeight: 40, itemHeight: this.options.cellHeight,
total: rows.length, total: rows.length,
generate: (index) => { generate: (index) => {
const el = document.createElement('div'); const el = document.createElement('div');

View File

@ -52,7 +52,7 @@ export default {
logs: false, logs: false,
layout: 'fixed', // fixed, fluid, ratio layout: 'fixed', // fixed, fluid, ratio
noDataMessage: 'No Data', noDataMessage: 'No Data',
cellHeight: null, cellHeight: 40,
inlineFilters: false, inlineFilters: false,
treeView: false, treeView: false,
checkedRowStatus: true, checkedRowStatus: true,