You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if it was possible to load the data into the expandable component depending on the row being clicked and not have it pre-populated.
I ask this as the amount of data being returned is a lot and would like to re move the data that is used in the expandable component into a separate end point.
{{#light-table table height='65vh' as |t|}}
{{t.head fixed=true}}
{{#t.body
canSelect=false
canExpand=true
onScrolledToBottom=(action 'onScrolledToBottom')
as |body|}}
{{#body.expanded-row as |row|}}
{{people/bio row=row click=onClick}}
{{/body.expanded-row}}
{{#if isLoading}}
{{#body.loader}}
{{paper-progress-linear}}
{{/body.loader}}
{{/if}}
{{#if table.isEmpty}}
{{#body.no-data}}
{{#unless isLoading}}
No results
{{/unless}}
{{/body.no-data}}
{{/if}}
{{/t.body}}
{{/light-table}}
and implement an onClick action of some sort that will know the row and then call the necessary end point to gather the data required.
The text was updated successfully, but these errors were encountered:
// my-data-loader.js
@actionasyncloadData(){constid=this.row.id;constdata=awaitfetch(`api-host/some-resources/${id}`);// or await this.store.findRecord('my-resource', id);set(this,'model',data);}// if glimmer:getrow(){returnthis.args.row;}
I was wondering if it was possible to load the data into the expandable component depending on the row being clicked and not have it pre-populated.
I ask this as the amount of data being returned is a lot and would like to re move the data that is used in the expandable component into a separate end point.
{{#light-table table height='65vh' as |t|}}
{{t.head fixed=true}}
{{#t.body
canSelect=false
canExpand=true
onScrolledToBottom=(action 'onScrolledToBottom')
as |body|}}
{{#body.expanded-row as |row|}}
{{people/bio row=row click=onClick}}
{{/body.expanded-row}}
{{#if isLoading}}
{{#body.loader}}
{{paper-progress-linear}}
{{/body.loader}}
{{/if}}
{{#if table.isEmpty}}
{{#body.no-data}}
{{#unless isLoading}}
No results
{{/unless}}
{{/body.no-data}}
{{/if}}
{{/t.body}}
{{/light-table}}
and implement an onClick action of some sort that will know the row and then call the necessary end point to gather the data required.
The text was updated successfully, but these errors were encountered: