diff --git a/apps/block_scout_web/assets/.eslintrc b/apps/block_scout_web/assets/.eslintrc index e3578aadfd..535509b69a 100644 --- a/apps/block_scout_web/assets/.eslintrc +++ b/apps/block_scout_web/assets/.eslintrc @@ -1,3 +1,6 @@ { - "extends": "standard" + "extends": "standard", + "env": { + "browser": true + } } diff --git a/apps/block_scout_web/assets/js/app.js b/apps/block_scout_web/assets/js/app.js index 9fa5c2a6d3..8ff4aa19f9 100644 --- a/apps/block_scout_web/assets/js/app.js +++ b/apps/block_scout_web/assets/js/app.js @@ -44,6 +44,7 @@ import './lib/stop_propagation' import './lib/token_balance_dropdown' import './lib/token_balance_dropdown_search' import './lib/token_transfers_toggle' +import './lib/async_listing_load' import './lib/tooltip' import './lib/try_api' import './lib/swappable_item' diff --git a/apps/block_scout_web/assets/js/lib/async_listing_load.js b/apps/block_scout_web/assets/js/lib/async_listing_load.js new file mode 100644 index 0000000000..f2ffe5fdb7 --- /dev/null +++ b/apps/block_scout_web/assets/js/lib/async_listing_load.js @@ -0,0 +1,85 @@ +import $ from 'jquery' +/** + * This script is a generic function to load list within a tab async. See token transfers tab at Token's page as example. + * + * To get it working the markup must follow the pattern below: + * + *