idyll-lang / idyll

Create explorable explanations and interactive essays.
http://idyll-lang.org/
MIT License
2.01k stars 87 forks source link

Table component must accept additional properties #128

Closed AlainRo closed 7 years ago

AlainRo commented 7 years ago

Reactable: One should control at minimum the columns order which implies to list columns names. Extension to table.js should be something like:


render() {
    const { className, data, columns, sortable, defaultSort, filterable } = this.props;
    return (
      <Table className={`table ${className || ''}`} data={data} columns={columns} sortable={sortable} defaultSort={defaultSort} filterable={filterable} />
    );
  }

Allowing to use:


[Table data:`[{x: 'A', '2016': 22}, {x: 'B', '2016': 34}]`  columns: `["x", "2016"]` className:"table1" /]
mathisonian commented 7 years ago

👍 this makes sense to me

mathisonian commented 7 years ago

Added in #180