-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(data-table): simplify sorting components
- Loading branch information
1 parent
5afa1d1
commit b8427b6
Showing
10 changed files
with
62 additions
and
104 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,8 +1,5 @@ | ||
<thead> | ||
<tr> | ||
{{yield (hash | ||
sortable=(component "data-table/head/sortable" update=@update sortedBy=@sortedBy) | ||
nonsortable=(component "data-table/head/nonsortable") | ||
)}} | ||
{{yield (component "data-table/head/column" update=@update sortedBy=@sortedBy)}} | ||
</tr> | ||
</thead> |
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,19 @@ | ||
<th> | ||
{{#if @sort}} | ||
<span | ||
data-test-sortable-th={{@sort}} | ||
class="sortable-th" | ||
role="button" | ||
{{on "click" (fn @update @sort)}} | ||
> | ||
{{yield}} | ||
{{#if (eq @sortedBy @sort)}} | ||
<UkIcon @icon="chevron-down"/> | ||
{{else if (eq @sortedBy (concat "-" @sort))}} | ||
<UkIcon @icon="chevron-up"/> | ||
{{/if}} | ||
</span> | ||
{{else}} | ||
{{yield}} | ||
{{/if}} | ||
</th> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
app/components/data-table/head/sortable.js → app/components/data-table/head/column.js
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 |
---|---|---|
@@ -1 +1 @@ | ||
export { default } from "ember-emeis/components/data-table/head/sortable"; | ||
export { default } from "ember-emeis/components/data-table/head/column"; |
This file was deleted.
Oops, something went wrong.
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
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
39 changes: 0 additions & 39 deletions
39
tests/integration/components/data-table/head/nonsortable-test.js
This file was deleted.
Oops, something went wrong.