1.1.23 • Published 6 years ago

b-cell v1.1.23

Weekly downloads
7
License
ISC
Repository
github
Last release
6 years ago

b-cells

B-cells is a component for rendering big data

Demo

Demo url

Get Starting

Define CellsModel

1.Init CellsModel

    var cellsModel = new HERE.UI.CELL.CellsModel();

2.Init Header

    var header = {
        height:50, // define header height
        minHeight:100,// define min height of header
        fields:[]
    };
    // Define header field
    var field = {
        name:'', // define column header name
        width:'', // define width absolute width,or relative width,eg 200px or 20%
        minWidth:'',// define min width of column
        maxWidth:'',
        //render:Function define render function
        style:{
            backgroundColor:'' // define background color
        }
    };
    header.fields.push(field);

2.Init Rows

    var rows = [];
    // Define row
    var row = {
        height:'10%',// define row height 
        minHeight:'100px'
    };
    // define row fields
    var fields = [];
    fields.push({
        value:'row text',
        html:'',// define html value
        //render:Function(cell),define render function
        style:{
            'background-color':'#ccc'
        }
    });
    row.fields = fields;
    rows.push(row);

3.Append header and rows to cellsModel

    cellsModel.header = header;
    cellsModel.rows = rows;

4.Init Cells

    var tableCell = new HERE.UI.CELL.Cells(cellsModel1,{
        renderTo:'#table1',// dom selector
        rowResize:true, // if row resizable
        colResize:true, // if column resizable
        scrollY:true, // if scroll Y
        scrollX:false, // if scroll X
        customScroll:null // use default scrollbar if null
        /*
         {
             width:12,height:13,hTrackColor:'',
             hScrollColor:'',
             vTrackColor:'',
             vScrollColor:'',
             autoHideX:true,
             autoHideY:true,
             timeout:1300
         }
         */
    });

5.Render cells

    tableCell.render();

6.Cells Event

  • Click Event (triggered when click cells area)
    tableCell.addEventListener('click', function (e) {
    })
  • Cells click Event (triggered when click a cell)
    tableCell.addEventListener('cellClick', function (e) {
    });
  • Scroll event (triggered when scrolling)
    tableCell.addEventListener('scroll', function (e) {
    });
1.1.23

6 years ago

1.1.22

7 years ago

1.1.21

7 years ago

1.1.20

7 years ago

1.1.19

7 years ago

1.1.18

7 years ago

1.1.17

7 years ago

1.1.16

7 years ago

1.1.15

7 years ago

1.1.14

7 years ago

1.1.13

7 years ago

1.1.12

7 years ago

1.1.11

7 years ago

1.1.10

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago