@GuillaumeGautreau yes, you are right.
In the component we had an action responsible for the data fetch:
smart-table.js
export default Component.extend(SmartViewMixin, {
…
actions: {
fetchData() { }
}
…
});
Inside the fechData() method we are collecting parameters from the filters and custom controls, combing them, send query to back-end and set records with the response.
In the template we are assigning fetchRecords with the custom action from our component:
smart-table.hbs
{{table/table-frame
columns=@columns
columnsVisible=@columnsVisible
collection=@collection
viewList=@viewList
records=@records
sortBy=(action “sortBy”)
sortedField=@sortedField
currentPage=@currentPage
numberOfPages=@numberOfPages
recordsCount=@recordsCount
isLoading=@isLoading
fetchRecords=(action “fetchData”)
updateColumn=@updateColumn
}}
{{table/table-footer
collection=@collection
viewList=@viewList
records=@records
currentPage=@currentPage
numberOfPages=@numberOfPages
recordsCount=@recordsCount
isLoading=@isLoading
fetchRecords=(action “fetchData”)
}}