Skip to content

Bug in tool? #201

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

Closed
robertmylne opened this issue Dec 14, 2016 · 4 comments
Closed

Bug in tool? #201

robertmylne opened this issue Dec 14, 2016 · 4 comments

Comments

@robertmylne
Copy link

robertmylne commented Dec 14, 2016

I have the following function below that gets run on a semantic ui dropdown.

let vue = this;
$('.ui.dropdown').dropdown({
    onChange(value, text, $selectedItem) {
        let type = $selectedItem[0].dataset.type;
        console.log(type)
        if(type == 'month') {
            vue.newCard['exp_month'] = value;
            console.log(vue)
        }
        if(type == 'year') {
            vue.newCard['exp_year'] = value;
            console.log(vue)
        }
    }
})

This does update the value in the data object, I can see this by logging it out, but it does not update in the vue devtools, well it does randomly (about 1 in every 10 times).

Vue DevTools
image

Chrome Console
image

@LinusBorg
Copy link
Member

LinusBorg commented Dec 14, 2016

@robertmylne
Copy link
Author

robertmylne commented Dec 15, 2016

Thanks for letting me know. I tried the below but it still does not update the data in the dev tools.

Vue.set(vue.newCard, 'exp_month', value);

@robertmylne
Copy link
Author

So another bit of code i'm using where the reactivity does not show in the vue dev tools. It only shows when I press the 'vue refresh' button.

window.addEventListener('trix-change', (e) => {
    let description = e.target.inputElement.defaultValue;
//  Vue.set(this.listing, 'description', description)
    this.$set(this.listing, 'description', description)
});

@LinusBorg
Copy link
Member

Further support on forum.vuejs.org, not on github issues.

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