Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
ember-light-table
Advanced tools
A lightweight contextual component based table addon that follows Ember's actions up, data down ideology.
ember install ember-light-table
If it is a bug please open an issue on GitHub.
There are two parts to this addon. The first is the Table which you create with column definitions and rows, and the second is the component declaration.
The Table
constructor accepts an array of Columns
or column options and an array of rows.
import Table from 'ember-light-table';
const table = new Table(columns, rows);
Here is a more real-word example
// components/my-table.js
import Ember from 'ember';
import Table from 'ember-light-table';
const computed = Ember.computed;
export default Ember.Component.extend({
model: null,
table: 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'
}, {
label: 'Address',
valuePath: 'address'
}, {
label: 'State',
valuePath: 'state'
}, {
label: 'Country',
valuePath: 'country'
}];
}),
init() {
this._super(...arguments);
this.set('table', new Table(this.get('columns'), this.get('model')));
}
});
For a list of possible column options, please checkout out the docs.
Now that we have our table
, we can declare our component in our template.
{{#light-table table as |t|}}
{{t.head}}
{{#t.body as |body|}}
{{#body.expanded-row as |row|}}
Hello <b>{{row.firstName}}</b>
{{/body.expanded-row}}
{{#if isLoading}}
{{#body.loader}}
Loading...
{{/body.loader}}
{{/if}}
{{#if table.isEmpty}}
{{#body.no-data}}
No users found.
{{/body.no-data}}
{{/if}}
{{/t.body}}
{{t.foot}}
{{/light-table}}
Please note that each of these contextual components have a wide array of options so it is advised to look through the documentation.
FAQs
Lightweight, component based table for Ember 3.4+
The npm package ember-light-table receives a total of 2,892 weekly downloads. As such, ember-light-table popularity was classified as popular.
We found that ember-light-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.