We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This plugin would provide an alternate API that consumers would use to enumerate their rows. Potentially something like:
type Rows = Array< | Row | { groupName: string, ...otherProperties, rows: Row[] } >;
To access these groups, a consumer would need to do something like:
import { meta } from 'ember-headless-table/plugins'; // ... meta.forTable(table, RowGrouping).rows;
This could be abstracted away from consumers via a helper function:
export const groupedRows = (table) => meta.forTable(table, RowGrouping).rows; export const isGroup = (row: Row | RowGroup) => 'groupName' in row;
Which could then be used in a template like this:
import { groupedRows, isGroup } from '...'; <template> {{! ... }} {{#each (groupedRows table) as |row|}} {{#if (isGroup row)}} markup tbd {{#each row.rows as |row|}} group content here {{/each}} {{else}} <tr> normal rows </tr> {{/if}} {{/each}} </template>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This plugin would provide an alternate API that consumers would use to enumerate their rows. Potentially something like:
To access these groups, a consumer would need to do something like:
This could be abstracted away from consumers via a helper function:
Which could then be used in a template like this:
The text was updated successfully, but these errors were encountered: