-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add documentation on customizing row collapse
- Loading branch information
Lukas Nys
committed
Jul 8, 2024
1 parent
dac69c3
commit bdeb367
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
tests/dummy/app/components/examples/customizing-row-collapse/template.hbs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{! BEGIN-SNIPPET docs-example-customizing-row-collapse.hbs }} | ||
<EmberTable as |t|> | ||
<t.head @columns={{this.columns}} /> | ||
|
||
<t.body | ||
@rows={{this.rows}} | ||
@onSelect={{action this.selectRows}} | ||
@selection={{this.selection}} | ||
as |b| | ||
> | ||
<b.row as |r|> | ||
<r.cell> | ||
<:collapse as |rowMeta onCollapseToggled|> | ||
<YourCustomButtonComponent | ||
@icon={{if rowMeta.isCollapsed "expand" "collapse"}} | ||
@onClick={{onCollapseToggled}} | ||
/> | ||
</:collapse> | ||
<:default as |value|> | ||
{{value}} | ||
</:default> | ||
</r.cell> | ||
</b.row> | ||
</t.body> | ||
</EmberTable> | ||
{{! END-SNIPPET }} |
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