Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RustyToms/4163413c93a4d3a6c35cf894dd42babc to your computer and use it in GitHub Desktop.
Save RustyToms/4163413c93a4d3a6c35cf894dd42babc to your computer and use it in GitHub Desktop.
ember-light-table-issue
import Ember from 'ember';
import Table from 'ember-light-table';
const { computed, Component, get, set } = Ember;
export default Component.extend({
init() {
this._super(...arguments);
set(this, 'table', new Table(get(this, 'columns'), get(this, 'model')));
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
columns: [{
label: 'foo',
resizable: true,
valuePath: 'foo',
width: '100px'
}, {
label: 'bar',
resizable: true,
valuePath: 'bar',
width: '100px'
}, {
label: 'baz',
resizable: true,
valuePath: 'baz',
width: '100px'
}, {
label: 'address',
resizable: true,
valuePath: 'address'
}],
model: [
{foo: 123, bar: 321, baz:"test", address: "000 Balistreri Centers Suite 27" },
{foo: 123, bar: 321, baz:"test", address: "000 Balistreri Centers Suite 272" },
{foo: 123, bar: 321, baz:"test", address: "000 Balistreri Centers Suite 272" },
{foo: 123, bar: 321, baz:"test", address: "000 Balistreri Centers Suite 272" },
{foo: 123, bar: 321, baz:"test", address: "000 Balistreri Centers Suite 272" },
{foo: 123, bar: 321, baz:"test", address: "000 Balistreri Centers Suite 272" }
]
});
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
.lt-column {
font-weight: 700;
padding: 10px 8px;
height: 43.5px;
border-bottom: 2px solid #111;
border-right: 1px solid #111;
}
.lt-cell {
position: relative;
padding: 10px 8px;
color: #222;
border-right: 1px solid #111;
height: 43.5px;
}
{{expandable-table model=model columns=columns}}
{{#light-table table height='300px' as |t|}}
{{t.head
fixed=true}}
{{#t.body
canSelect=false
multiRowExpansion=false
as |body|}}
{{/t.body}}
{{/light-table}}
{
"version": "0.11.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.12.0",
"ember-template-compiler": "2.12.0"
},
"addons": {
"ember-light-table": "1.8.6"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment