-
Notifications
You must be signed in to change notification settings - Fork 51
Showcase - Convert Table route to TS #3067
New issue
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
Changes from all commits
4fc94a6
28ee54c
a506d4a
0aba88d
1531252
f615b9d
dc36108
0235272
b1e572e
b33a4da
3cea4bc
d0ac2c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ import { deepTracked } from 'ember-deep-tracked'; | |
import { later } from '@ember/runloop'; | ||
|
||
import type { PageComponentsAdvancedTableModel } from 'showcase/routes/page-components/advanced-table'; | ||
import type { SelectableItem } from 'showcase/mocks/selectable-item-data'; | ||
import type { User } from 'showcase/mocks/user-data'; | ||
|
||
import type { | ||
HdsAdvancedTableOnSelectionChangeSignature, | ||
|
@@ -25,12 +27,12 @@ const customSortingCriteriaArray = [ | |
'pending', | ||
]; | ||
|
||
const updateModelWithSelectAllState = <T>( | ||
modelData: T[], | ||
const updateModelWithSelectAllState = ( | ||
modelData: SelectableItem[] | User[], | ||
selectAllState: boolean, | ||
) => { | ||
modelData.forEach((modelRow) => { | ||
if (modelRow instanceof Object && 'isSelected' in modelRow) { | ||
if (modelRow instanceof Object) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Note] The |
||
modelRow.isSelected = selectAllState; | ||
} | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😎 nice