Open wmira opened 9 years ago
Take in count that if you are operating an API and use pagination, you'll need to hit the API each time column sort is applied (unless there is only one page). It would be enough if you had a callback for sorting like this:
onSort(property, direction)
- On API level I would trigger something like GET <resource>?sortBy=property
or GET <resource>?sortBy=-property
(minus for descending) then and set table data
to the result either directly or through an action.In addition I would need a trigger for edit. Something like the following could work:
onEdit(row)
- Then I would hit an action like update
on this callback and that would hit the API with PUT <resource>
and update the data model.
update datasource event mechanism so we can play nicely with any flux architecture based apps