Page MenuHomePhabricator

[explorer] fix DataTables warning about Reinitialise DataTable
ClosedPublic

Authored by alitayin on Dec 15 2023, 13:07.

Details

Reviewers
bytesofman
emack
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABCcbea3a052541: [explorer] fix DataTables warning about Reinitialise DataTable
Summary

I think the error should be due to the DataTable initialization in blocks.js attempting to reinitialize during certain conditions (such as cache conflicts caused by rapid clicking). Adding retrieve: true should be a choice without negative side effects. Since it hasn't been tested in an instance, I hope the explorer dev could conduct a test.

Test Plan

It has only been tested in the browser's console.

before:

console.log("Initializing DataTable...");
$('#blocks-table').DataTable({
});

after:
console.log("Initializing DataTable...");
$('#blocks-table').DataTable({

retrieve: true,

});

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25976
Build 51526: Build Diff
Build 51525: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Dec 15 2023, 13:07
alitayin retitled this revision from fix DataTables warning about Reinitialise DataTable to [explorer] fix DataTables warning about Reinitialise DataTable.Dec 15 2023, 13:08

This makes sense. All the other initialization parameters are static so it doesn't have any drawback afaict.

This revision is now accepted and ready to land.Dec 18 2023, 08:32