question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pull-to-refresh does not work programmatically

See original GitHub issue

This 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:closed
  • Created 7 years ago
  • Comments:13

github_iconTop GitHub Comments

2reactions
lroalcommented, Oct 31, 2016

Success ! Thank you.

1reaction
vishnoorcommented, Nov 29, 2017

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) {

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found