Public methods for the user to execute - mingzhangyang/data2table GitHub Wiki

  • setRowsPerPage

    it is used to set and update the number of rows displayed per page
    
      @param n: int from [5, 10, 20, 50, 100, 200]
    
    
  • setFormatter

    set the formatter for a specific column to create customized elements with the data, the provided 
    `func` should return an document element object or innerHTML
       @param colName
       @param func
    
  • configureColumn

    customize a column to show
       @param name: string, column name
       @param obj: object, an object describing the column
    
  • configureLayout

    configureLayout method set configuration property
       @param prop: string
       @param value: boolean | string
    
  • setShownColumns

    set the shown columns and hidden columns
       @param arr: array of strings (column names)
    
  • addFilter

    set a faceting column
       @param colName
       @param type (optional, default="value"), currently supporting value faceting only
    
  • setFirstCloumnType

    set the type of the first column
       @param type, <string>, number | checkbox | image | custom
       @param elementDescriptor <object>, e.g. {tagName: 'div', className: 'my-class', text: 'some text'}
    
  • generate

    Users should execute this function to generate the table
    
⚠️ **GitHub.com Fallback** ⚠️