JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums General Discussions Smart.App data binding regression in 4.2 vs 4.1

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #100238
    admin
    Keymaster

    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
    #100244
    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
    admin
    Keymaster

    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
    admin
    Keymaster

    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.

    #100248
    admin
    Keymaster

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

    #100251
    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
    admin
    Keymaster

    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
    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
    admin
    Keymaster

    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.