Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Counter doesn't update on :end value change #1

Open
ipa1981 opened this issue May 7, 2016 · 4 comments
Open

Counter doesn't update on :end value change #1

ipa1981 opened this issue May 7, 2016 · 4 comments

Comments

@ipa1981
Copy link

ipa1981 commented May 7, 2016

In the example provided in source
I change

<vuecountup class="myCounter" :end="**counter**" :duration="2.5" :options="{useEasing : true,
            useGrouping : true,
            separator : ',',
            decimal : '.',
            prefix : '',
            suffix : ''}"></vuecountup> 

And add

    var oVue = new Vue({
        el: '#App',
**              data: {
                    counter: 100
                }**
    });

Unfortunately any change to counter value, doesn't update numbers vuecountup output

@jryd
Copy link

jryd commented Nov 10, 2016

@ipa1981 did you ever find a workaround for this? I'm looking at integrating this in to a small project I am working on and would want the counter to go up as the :end value changes.

@ipa1981
Copy link
Author

ipa1981 commented Nov 11, 2016

@jryd I don't recall the details. But seems I had to go harder way and used CountUp lib directly.
Something like that:

var currentValue = 0;
setNewValue = function(newValue){
    var numAnim = new CountUp("domElementId", currentValue, newValue);
    numAnim.start();
    currentValue = newValue;
}

@samcrosoft
Copy link
Owner

samcrosoft commented Feb 14, 2017

This has been fixed in the latest update of the code. I apologize for taking so long to fix this issue. It frankly went unnoticed.

@ipa1981
Copy link
Author

ipa1981 commented Feb 15, 2017

Thanks, can you push latest version to NPM to test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants