NativeScript MaskedInput databinding

你离开我真会死。 提交于 2020-01-07 06:25:16

问题


I am trying to use the MaskedInput widget (https://github.com/bthurlow/nativescript-maskedinput) and I am having trouble getting the databinding to work. Here is my code:

<mi:MaskedInput mask="999 999 9999" placeholder="_" text="{{ customer.homephone }}" color="#a8b4b9" />

The above snippet does not display the phone number initially. I am positive the customer.homephone has value in it because

<TextField text="{{ customer.homephone, customer.homephone | phoneConverter() }}" class="value bold" />

displays it correctly. If I replace the text property of the MaskedInput with a hard-coded value, the value is displayed. It seems to me that there is something going on with the databinding. Am I missing something here?

Any ideas are highly appreciated.

Thank you.


回答1:


You are doing things correctly, but from what I see from the code of that plugin it does not support data binding.



来源:https://stackoverflow.com/questions/38017201/nativescript-maskedinput-databinding

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!