-
Notifications
You must be signed in to change notification settings - Fork 56
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
Vue text binding issue #93
Comments
@ardoramor what version of NativeScript-Vue are you using? I'm assuming that you are rendering the component in a ListView, which has recently been refactored to avoid issues like this. The issue is that the initial render is done using a See the release where the change has been made: https://github.com/nativescript-vue/nativescript-vue/releases/tag/v2.0.0-alpha.0
If you can't update NativeScript-Vue you can work around the issue by adding a typecheck inside the template or use a computed property - this is ugly but works (not required in the 2.0 alpha releases) <CheckBox :text="typeof item.text === 'String' ? item.text : ''" v-model="item.checked" /> |
@rigor789 It's actually from the playground. Looks to be the latest @1.3.1 Here are the version of packages used: { |
The fix has been released in |
I'm not sure if this plugin supports vue or the readme provides just the minimal integration. However, I'm running into a strange issue where the
text
binding causesError: Cannot convert object to Ljava/lang/Object; at index 0
In my
app.js
, I do the following:I have a list of items that are rendered with a component. The components template is:
The exception is thrown on Android from this line: https://github.com/nstudio/nativescript-checkbox/blob/master/checkbox.android.ts#L129
Putting some debug statements, I see the following output when the first item is
{text: "testValue", checked: false}
.However, when I change my template to the following (i.e.,
text
is not longer bound and is simply a static attribute), I don't get the exception but I also don't get the desired results.When the above template is used, I never get the unexpected
{}
ordefault
value set on the textProperty. What this tells me is either Vue integration with NativeScript has a bug or this plugin. Yet, I'm just starting to play around with NativeStript Vue and so don't have a full grasp. Would definitely appreciate if anyone could shed some light on the issue.The text was updated successfully, but these errors were encountered: