Options
All
  • Public
  • Public/Protected
  • All
Menu
author

Berk Baski berk.baski@smartface.io

copyright

Smartface 2021

Index

Constructors

constructor

  • new default(options: TableInitOptions): default
  • It's creating a table in WebView or WebViewBridge using given values and style parameters

    example
    const headerColumns = ['First name', 'Last name'];
    const bodyColumns = [
    { first: 'Shmi', last: 'Skywalker' },
    { first: 'Anakin', last: 'Skywalker' },
    { first: 'Luke', last: 'Skywalker' },
    { first: 'Leia', last: 'Organa' },
    { first: 'Han', last: 'Solo' }
    ];

    const table = new Table({
    webView: this.webView1,
    tableOptions: {
    rows: [
    {
    rowStyles: {
    color: '#fff',
    fontWeight: 'bold',
    backgroundColor: '#000'
    },
    columns: headerColumns.map(key => ({ key }))
    },
    ...bodyColumns.map(column => ({
    rowStyles: {
    padding: '10px 0',
    borderBottom: '1px solid #000'
    },
    columns: [
    { key: column.first },
    { key: column.last }
    ]
    }))
    ]
    }
    });
    table.render();

    Parameters

    • options: TableInitOptions

      options - Base options object

    Returns default

Properties

styleTypes

styleTypes: Readonly<{ width: string; height: string; margin: string; marginLeft: string; marginRight: string; marginBottom: string; marginTop: string; padding: string; paddingLeft: string; paddingRight: string; paddingBottom: string; paddingTop: string; color: string; background: string; backgroundColor: string; fontSize: string; fontWeight: string; fontFamily: string; border: string; borderLeft: string; borderRight: string; borderBottom: string; borderTop: string; alignItems: string; justifyContent: string; diplay: string; position: string; left: string; right: string; bottom: string; top: string; zIndex: string }> = ...

Web equivalent of CSS properties

webView

webView: WebView

tableOptions

tableOptions: TableOptions

Methods

render

  • render(): void
  • It renders the table chart options to the WebView or WebViewBridge browser

    method

    Returns void

generateHtml

  • generateHtml(): string

Generated using TypeDoc