简体   繁体   中英

aureliajs, value converter does not update the value on ` & updateTrigger:'blur'`

I am using a value converter on an input with type text in aureliajs. While it is updating in normal way, it converts the value both in input and its bound value. But when adding & updateTrigger:'blur' , the input text does update on user blurs but the bound value not getting data. For example:

<input type="text" value.bind="name | converter & updateTrigger:'blur'"/>

versus.

<input type="text" value.bind="name | converter"/>

in the second case, both text of input and variable name do update but in the first case, only text does.

Is this a bug in aurelia binding or my mistake?

the markup looks ok. Are you implementing both toView and fromView functions in your converter? I tried your markup in a test setup and it works fine. You can check it out at

https://codesandbox.io/embed/value-converter-uhjp9

Best regards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM