wozjac / jsono-model Goto Github PK
View Code? Open in Web Editor NEWSAPUI5/OpenUI5 JSON-based model with full observability
License: Apache License 2.0
SAPUI5/OpenUI5 JSON-based model with full observability
License: Apache License 2.0
Hello!
Recently I've discovered that binding to objects, on which Object.freeze
was ran did not work, with some weird error about proxies.
I've put together a simple repository to demonstrate this issue here.
A workaround is to import such objects directly as separate modules, but in this case no binding to them is possible.
I find this concept useful, because it also insures runtime immutability, when things get boiled down to plain JS, you can never be to cautious of side effects there.
Please let me know if I am missing something or if anything else is needed.
Any help is appreciated.
BR
Dimitar
Hi,
I've noticed if you invoke model.arrayProp.sort()
it wraps the array objects in a proxy and it continues to do this with each call. If the sort is in a function and it gets called multiple times, the array objects continue to be nested in more and more proxies, which after a couple of calls causes ui5 to completely freeze when accessing them.
Am I doing something wrong? Any help on this is greatly appreciated.
Best regards,
Dimitar
We found this and decided to take it up for a test because we liked the idea and the implementation seemed neat. However when doing an aggregation binding, ui5 breaks during an attempt to call slice
.
Changing the makeProxyFor
function to this removes the error from the console
Am I missing something? Thanks for the support!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.