HTML Elements Forums General Discussions Smart.App data binding regression in 4.2 vs 4.1

Tagged: 

This topic contains 8 replies, has 2 voices, and was last updated by Avatar Anonymous 1 year ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #100238
    Avatar
    Anonymous

    Hi,

    https://codepen.io/cetinsert/pen/jONmPNQ?editors=1011

    1. app.data.details field value types are in 4.2 object-ified char/string arrays vs 4.1 strings
    2. app.data.details fields¬ 4.2¬ cannot be assigned to update the view in real-time;¬ 4.1 can

    Please review – this might affect simpler data bindings too.

    Thanks,
    Cetin

    • fixed link
    • This topic was modified 1 year, 1 month ago by Avatar .
    • This topic was modified 1 year, 1 month ago by Avatar .
    • This topic was modified 1 year, 1 month ago by Avatar .
    #100244
    Avatar
    admin
    Keymaster

    Hi Cetin,

    app.data is an Object. This is not a regression. It is by design. If you want to set the data, you will need to set the entire object.

    Regards,
    George

    Smart HTML Elements
    https://www.htmlelements.com

    #100245
    Avatar
    Anonymous

    I have updated the link with whole-object set.

    Still, how can I read app.data.details.subject with its non-string value type?

    #100246
    Avatar
    Anonymous

    I honestly found it was truly magical that I could just assign to arbitrarily nested app.data subfields and the view would just update live before my eyes.

    That was something no other framework has.

    If this sudden change is not for a deep technical reason, I would like to kindly ask the person/team behind the data binding feature to reconsider adding support for this back.

    • This reply was modified 1 year, 1 month ago by Avatar .
    • This reply was modified 1 year, 1 month ago by Avatar .
    • This reply was modified 1 year, 1 month ago by Avatar .
    #100248
    Avatar
    Anonymous

    https://www.htmlelements.com/docs/view-model-binding/ has sections about grid stack layout at the end of the page. )

    #100251
    Avatar
    admin
    Keymaster

    We will reconsider this. The change was about the fact that data was not appropriate for form post, but we can expose a new property for that.

    #100252
    Avatar
    Anonymous

    Oh, I am infinitely delighted to hear that!

    I have an app that is now stuck at 4.1 due to this.

    <hr />

    https://codepen.io/cetinsert/pen/jONmPNQ?editors=1011 has just been updated with

    notes on the 4.2 regressions (version 3.1 through 4.2, marked !!) of

    1. behavior – marked¬ 0, 2, 4
    2. data type – marked¬ T

    Thank you!

    #100257
    Avatar
    admin
    Keymaster

    Hi Cetin,

    The old behavior of the ‘data’ object is now available again. The behavior introduced in 4.2.0 is available through the jsonData property of Smart.App. We introduced also a new property formData which is useful for Posting Forms.

    Regards,
    George

    Smart HTML Elements
    https://www.htmlelements.com

    #100262
    Avatar
    Anonymous

    Hi George,

    Your response times are astonishing! It makes using your forums such a pleasure.

    Thanks,
    Cetin

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.