Forked from RustyToms/components.expandable-table.js
Last active
November 10, 2017 06:02
-
-
Save Techn1x/f8bba289730a0caba2cf416141c13199 to your computer and use it in GitHub Desktop.
DEMO TABLE V1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'))); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
columns: [{ | |
label: 'foo', | |
resizable: true, | |
draggable: true, | |
valuePath: 'foo', | |
width: '100px' | |
}, { | |
label: 'bar', | |
resizable: true, | |
draggable: true, | |
valuePath: 'bar', | |
width: '100px' | |
}, { | |
label: 'baz', | |
resizable: true, | |
draggable: true, | |
valuePath: 'baz', | |
width: '100px' | |
}, { | |
label: 'other', | |
resizable: true, | |
draggable: true, | |
valuePath: 'baz', | |
width: '100px' | |
}, { | |
label: 'new', | |
resizable: true, | |
draggable: true, | |
valuePath: 'baz', | |
width: '100px' | |
}, { | |
label: 'address', | |
resizable: true, | |
draggable: 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" } | |
] | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-column.is-drag-target::after { | |
position: absolute; | |
top: 0; | |
background-color: red; | |
content: ''; | |
width: 2px; | |
height: 100%; | |
z-index: 2; | |
} | |
.lt-column.drag-right::after { | |
right: -1px; | |
} | |
.lt-column.drag-left::after { | |
left: -1px; | |
} | |
.lt-cell { | |
position: relative; | |
padding: 10px 8px; | |
color: #222; | |
border-right: 1px solid #111; | |
height: 43.5px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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.10.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment