-
-
The idea is to not pass complex data to the components. Keep the data to a minimum, preferably just a few arguments that way they'll be easier to pick up by others.
If you really need to pass ko data use data-bind instead. I.e.
<my-component data-bind=attr: { 'data-foo': someObservable }"></my-component>
HUE-9394. [ui] Cannot pass complex data into web components (sree)
Review Request #15274 — Created June 26, 2020 and submitted
Information | |
---|---|
Sreenath | |
hue | |
master | |
HUE-9394 | |
2839c13... | |
Reviewers | |
hue | |
johan, romain |
commit c60d3b902ee1543fcf1726bb29f676816fb97e08 Author: sreenaths <sree@apache.org> Date: Sat Jun 27 02:23:09 2020 +0530 HUE-9394. [ui] Cannot pass complex data into web components (sree) :000000 100644 0000000000 efedb59edc A desktop/core/src/desktop/js/ko/bindings/ko.webcomp.js :100644 100644 26674ecfa1 bcad850989 M desktop/core/src/desktop/js/ko/ko.all.js
Manual testing done by creating a test web component and passing complex data structures including a function as property.
Change Summary:
Updated the implimentation based on the discussions.
Commit: |
|
||
---|---|---|---|
Diff: |
Revision 2 (+35) |