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

fix vue2.0 checkbox cannot display bug #37

Closed
wants to merge 1 commit into from
Closed

fix vue2.0 checkbox cannot display bug #37

wants to merge 1 commit into from

Conversation

yugasun
Copy link

@yugasun yugasun commented Jan 10, 2017

when I use vuetable-2 for vue2.0, I have config thefields attribute, but checkbox cannot display. After read the source code I found that it still use props mutable, but vue2.0 has deprecated (2.0 Changes). So I add a middle parameter tableFields to act as the mutable data.

@ratiw
Copy link
Owner

ratiw commented Jan 11, 2017

Thanks, @yugasun for the PR. However, this bug has already been fixed and has nothing to do with the fields attribute. Vue does not throw any warning or error with the way I reuse fields prop right now. If you clone and run the project, you should see no error from Vue regarding this.

But I'm quite curious why adding tableFields variable and use it instead of the old fields prop does solve your problem with the checkbox as I cannot see any relationship on this. Furthermore, the checkbox field in my example is still working correctly.

@yugasun
Copy link
Author

yugasun commented Jan 12, 2017

@ratiw , In my project I init the vuetable attribute fields, but the fields need change depending on the function loadSuccess data, so I have to change the props fields, but in > vue2.0 mutable props has been deprecated. So I add this PR for my project.

@ratiw
Copy link
Owner

ratiw commented Jan 29, 2017

@yugasun This is to let you know that mutating fields prop inside Vuetable is now actually a bug as reported and discussed in #51 when directly assigning an array to fields prop. This makes the code in normalizeFields method behaves incorrectly. This does not occur when assigning an array object to fields prop.

@ratiw ratiw closed this May 30, 2017
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

Successfully merging this pull request may close these issues.

2 participants