Pull-to-refresh does not work programmatically
See original GitHub issueThis is a bug.
- Framework7 Version: february 2016
- Platform and Target: chrome on linux.
When adding the pull-to-refresh programmatically, neither the arrow down nor the spinner shows. Actually, you can reproduce the same by just pasting in the pull-to-refresh-html in developer modus in chrome instead of doing it by code. The sample below doesn’t format properly, but I hope you understand. html:
<body>
<!-- Status bar overlay for full screen mode (PhoneGap) -->
<div class="statusbar-overlay"></div>
<div class="panel-overlay"></div>
<!-- Views -->
<div class="views">
<div class="view view-main">
<div class="pages">
<div id='home' data-page="home" class="page navbar-fixed toolbar-fixed">
</div>
</div>
</div>
</div>
<script type="text/javascript" src="main.js"></script>
</body>
js:
var myApp = new Framework7();
var mainView = myApp.addView('.view-main', {
dynamicNavbar: true
});
var win = require('window');
win.$$ = Dom7;
win.app = myApp;
var region = document.getElementById('home');
var cont = '<div class="navbar">
<div class="navbar-inner">
<div class="left"></div>
<div class="center">Climbing gyms</div>
<div class="right"></div>
</div>
</div>
<div data-name="pullToRefreshGyms" id="pullToRefreshGyms" class="page-content pull-to-refresh-content" data-ptr-distance="55">
<div class="pull-to-refresh-layer">
<div class="preloader"></div>
<div class="pull-to-refresh-arrow"></div>
</div>
</div>';
win.$$('#home').html(cont);
Issue Analytics
- State:
- Created 7 years ago
- Comments:13
Top Results From Across the Web
Call Chris Banes pull to refresh programmatically without the ...
First I would suggest to use the support pull to refresh very easy to use.
Read more >Mastering Pull to Refresh and Refreshable in SwiftUI
In this article, you will learn how to add pull to refresh ... An asynchronous function, on the other hand, does not block...
Read more >PullToRefresher on CocoaPods.org
Unfortunaly, UITableView with sections currently not supported. But you can resolve this problem in two steps: Create you own PullToRefresh (see instructions ...
Read more >Pull to refresh in SwiftUI with refreshable - Sarunw
.refreshable { // Nothing to execute } } } Refresh indicator bounces back immediately. This is different from what we have in UIKit, ......
Read more >Implementing Pull to Refresh Guide - CodePath Cliffnotes
In Android, the common "pull to refresh" UX concept is not built in to a ListView/RecyclerView. However, many Android applications would like to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Success ! Thank you.
I had the same issue. The official doc example mentions the sample code as
// Add ‘refresh’ listener on it ptrContent.on(‘ptr:refresh’, function (e) {
It should be // Add ‘refresh’ listener on it ptrContent.on(‘refresh’, function (e) {