Created
June 20, 2017 18:26
-
-
Save mastastealth/bc7c90192974d4ac318f7310d5bdee5d to your computer and use it in GitHub Desktop.
Reopen Test
This file contains 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 } = Ember; | |
export default Ember.Component.extend({ | |
model: null, | |
columns: computed(function() { | |
return [{ | |
label: 'Avatar', | |
valuePath: 'avatar', | |
width: '60px', | |
sortable: false, | |
cellComponent: 'user-avatar' | |
}, { | |
label: 'First Name', | |
valuePath: 'firstName', | |
width: '150px' | |
}, { | |
label: 'Last Name', | |
valuePath: 'lastName', | |
width: '150px' | |
}]; | |
}), | |
table: computed('model', function() { | |
return new Table(this.get('columns'), this.get('model')); | |
}) | |
}); | |
// Reopen 1 | |
Table.reopen({ | |
sharedOptions: null | |
}); | |
import TableHeaderMixin from 'ember-light-table/mixins/table-header'; | |
TableHeaderMixin.reopen({ | |
// Reopen 2 | |
actions: { | |
foo(columnGroup) { Ember.logger.log('Bar'); } | |
} | |
}); | |
import Cell from 'ember-light-table/components/cells/base'; | |
Cell.reopen({ | |
something: 'else' | |
}); | |
import ColumnClass from 'ember-light-table/classes/Column'; | |
ColumnClass.reopen({ | |
showing: true | |
}); |
This file contains 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', | |
model() { | |
return Ember.RSVP.hash({ | |
rows: [ | |
{ firstName: 'Brian' }, | |
{ firstName: 'Bob' }, | |
{ firstName: 'Bill' } | |
] | |
}); | |
} | |
}); |
This file contains 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.12.1", | |
"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", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-data": "2.12.1", | |
"ember-light-table": "1.8.6" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment