Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-9394

[ui] Cannot pass complex data into web components

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.7.0
    • Fix Version/s: None
    • Component/s: core.ui
    • Labels:
      None

      Description

      Currently web components created with Vue can only accept properties of string datatype from Knockout. 

      • It's not practical to serialise and deserialise all data passed into a web component.
      • When we need to pass things like function, even SerDe wouldn't help.
      • Handling events is tough

      Hence we need a better approach, to pass properties.

      Proposed solution is to create custom knockout binding handlers. It could be named vueProps & vueEvents for props and events respectively. Once the handler is added to knockout, we must be able to add Vue web components as follows. 

      <component-tag-name data-bind="
        vueProps: {'propName': 'value', ...},
        vueEvents: {'event-name': handlerFunction, ...}
      "></component-tag-name>
       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Somarajapuram Sreenath
                Reporter:
                Somarajapuram Sreenath
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: