-
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 selection
- Loading branch information
Lukas Nys
committed
Jul 8, 2024
1 parent
4321540
commit dac69c3
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
tests/dummy/app/components/examples/customizing-row-selection/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-selection.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> | ||
<:select as |rowMeta onSelectionToggled|> | ||
<YourCustomCheckboxComponent | ||
@checked={{rowMeta.isGroupSelected}} | ||
@onClick={{onSelectionToggled}} | ||
/> | ||
</:select> | ||
<: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