Skip to content

Having object reactively update when nested fields are updated #82

Description

@abdelba

Hi, why does an object with nested fields is not updated when nested fields are changed ?

Consider the following schema:

var schema = {
  size: {
    type: Object
  },
  'size.value': {
    type: Number
  },
  'size.unit': {
    type: String,
    allowedValues: ['cm', 'in']
  }
};

and the following template:

<template name="sizeInput">
    <p>
        value is {{reactiveValue.value}}
        unit is {{reactiveValue.unit}}
    <p>

    {{> UI.contentBlock}}
</template>

and I use it like so:

{{#sizeInput field="size"}}
    {{>input field="size.value"}}
    {{>select field="size.unit"}}
{{/sizeInput}}

The sizeInput element is registered without validationEvent.
When I update the input and select value, the reactiveValue doesn't change.

Am I missing something ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions