@boikom
@boikom
Forum Replies Created
-
AuthorPosts
-
admin
Keymaster4.3 has an
app.toJSON()
method – cannot findapp.jsonData
property though.admin
KeymasterHi George,
Your response times are astonishing! It makes using your forums such a pleasure.
Thanks,
Cetinadmin
KeymasterHi jtara,
With the Smart ver. 4.3.0, Smart.App is extended with “jsonData” and “formData” properties. “jsonData” gets the “data” without the extended observable properties. “formData” returns FormData object.
Regards,
George
Smart HTML Elements Team
https://www.htmlelements.comadmin
KeymasterHi 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.comAugust 28, 2019 at 8:22 am in reply to: grid with css height auto and add new row fails to display rows after ~3 adds #100256admin
KeymasterHi,
New Update: The reported behavior of the Grid is resolved in ver. 4.3.0.
Regards,
Boyko Markov
Smart Html Elements Team
https://www.htmlelements.com/August 27, 2019 at 7:45 am in reply to: grid with css height auto and add new row fails to display rows after ~3 adds #100253admin
KeymasterThank you!
Still persists ifediting.batch == true
also holds though.
https://codepen.io/cetinsert/pen/rNBmxBK (marked !!)admin
KeymasterOh, 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- behavior – marked 0, 2, 4
- data type – marked T
Thank you!
admin
KeymasterWe 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.
admin
Keymaster( https://www.htmlelements.com/docs/view-model-binding/ has sections about grid stack layout at the end of the page. )
admin
KeymasterI 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.admin
KeymasterI have updated the link with whole-object set.
Still, how can I read app.data.details.subject with its non-string value type?admin
KeymasterHi 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.comAugust 27, 2019 at 5:33 am in reply to: Smart.App data binding smart-model='reference' vs value='{{reference}}'' #100243admin
KeymasterHi Cetin,
It’s better to use {{value}} for declarative rendering only. The smart-model also determines automatically the component type and binds it as the bound property could not be ‘value’, it could be ‘selectedValues’ for lists, ‘checked’ for checkboxes and radio buttons.
Best Regards,
George
Smart HTML Elements
https://www.htmlelements.comAugust 26, 2019 at 2:22 pm in reply to: grid with css height auto and add new row fails to display rows after ~3 adds #100237admin
KeymasterHi,
Update: The reported behavior of the Grid is resolved in ver. 4.2.0.
Regards,
Boyko Markov
Smart Html Elements Team
https://www.htmlelements.com/admin
KeymasterI have a workaround – I actually already had the keys in my own object, which I used to initialize app.
// Note: data can only be nested one-deep!
// As well, event functions cannot be nested!
const smartData = {
enrollmentNewSubmit: newEnrollmentSubmit,
enrollmentNew: {
courseID: ”,
loginName: ”,
studentID: ”
},
schoolNewSubmit: newSchoolSubmit,
schoolNew: {
name: ”,
shortName: ”,
description: ”,
address: ”,
city: ”,
stateCode: ”,
zipCode: ”,
province: ”,
country: ‘US’,
postalCode: ”,
codes: ”,
tags: ”,
notes: ”,
annex: ”
}
};
So, I can e.g.
for (const key of Object.keys(smartData.schoolNew)) {
console.log(<backtick>key: ${key} hasOwnProperty: ${boundAttrs.hasOwnProperty(key)} type: ${typeof boundAttrs[key]}<backtick>);
}
So, I can iterate through that way and get only my own added properties.
Please add some easy way to do this in the future, or let me know what I am missing if it already exists. -
AuthorPosts