Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Could you please add parameter [callback, resetPaging] when reload data from Ajax source #273

Closed
mixedmuffin opened this issue Apr 10, 2015 · 2 comments
Milestone

Comments

@mixedmuffin
Copy link

Dear @l-lin,

In datatable API ajax.reload(), it can set param 'resetPaging' to false then datatable will hold the current paging position. But DTInstances.reloadData() doesn't have this feature.
Currently, I use $('#tableName').DataTable().ajax.reload(null, false); and it work fine. But would be great if you support this feature in DTInstances.reloadData()

@l-lin
Copy link
Owner

l-lin commented Apr 10, 2015

Fixed in the upcoming version 0.4.3 (see ##266).

@l-lin l-lin closed this as completed Apr 10, 2015
@mixedmuffin
Copy link
Author

Hi again,

I see your fix in angular-datatables.renderer.js at line 396: _oTable.ajax.reload(null, false);. My concern is that it may force the caller to hold the current datatable state.
It would be great if DTInstances.reloadData() have parameter same as DataTable().ajax.reload(). Something like this:

function reloadData(callback, resetPaging) {
    if (_oTable) {
        _oTable.ajax.reload(callback, resetPaging || true);
    }
}

@l-lin l-lin added this to the v0.4.3 milestone Apr 10, 2015
@l-lin l-lin reopened this Apr 10, 2015
l-lin added a commit that referenced this issue Apr 14, 2015
@l-lin l-lin closed this as completed Apr 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants