Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

referencing property changes #29

Description

@varunagg45

I have a requirement that the value of the field depends on the value of another field.
eg.

schema = {
  title      : "My pretty form",
  description: "Declarative pure data DSLs are the best.",
  type       : "object",
  properties : {
   
   comments: {
      title      : "Your comment",
      description: "Type something here.",
      type       : "string",
      minLength  : 1
    },
    
    anotherField: {
      title      : "autocomplete",
      references: ['comment']                                               // new property
      description: "auto",
      'x-hints': {
        'form': {
          'inputComponent': 'async-autocomplete'
        }
      }
    }
 }
};

Now i added references something new to the above schema. My requirement is that this custom component can have a listener that can listen to any changes to the fields mentioned in references, in above case any change made to comments field should trigger a listener in anotherField. Can someone help me with this?

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