ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

RadDataForm PropertyConverter does not work when specified via JSON metadata #1293

Open msn444 opened 5 years ago

msn444 commented 5 years ago

When specifying a PropertyConverter via the "converter" property in a JSON metadata object, the convertTo and convertFrom methods are never called. It works fine when specified using markup.

This can be seen in the dataform example at https://github.com/NativeScript/nativescript-ui-samples-vue/tree/master/dataform -- the "Editors using markup" module behaves as expected, while the "Editors" module (which specifies the converter via metadata) does not.

tsonevn commented 5 years ago

Hi @msn444, Can you provide more info about the case? I tested it on my side while using the nativescript-ui-samples-vue and nativescript-ui-samples, however, the DataForm content seems to be rendered correctly on my side in both scenarios(When it is defined via XML/HTML and via JSON).

msn444 commented 5 years ago

The content rendering isn't the problem. The problem is that the convertTo and convertFrom methods in the custom PropertyConverter class (MovieConverter defined in data.ts in the example) do not get called if the converter is specified in the JSON metadata rather than markup. The demo app does nothing with the selected data so it doesn't manifest as a problem in the demo; you have to log the convertTo/convertFrom methods to see that they're not working, or look at the source object (ticket) and see that it doesn't get updated.

tsonevn commented 4 years ago

Hi @msn444, Excuse me for the delay in reply. I rechecked the case and currently convertTo and convertFrom methods are not supported, when we are loading the metadata and the source of RadDataForm via JSONs. On that matter, can you provide more info about your use-case and what you are trying to achieve as a final result?

eso0o commented 4 years ago

so any solution regarding that issue ?